Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

lowercase or uppercase all strings in array javascript

const names = ['Ali', 'Atta', 'Alex', 'John'];

const lowercased = names.map(name => name.toLowerCase());

console.log(lowercased);
// ['ali', 'atta', 'alex', 'john']

const uppercased = names.map(name => name.toUpperCase());

console.log(uppercased);
// ['ALI', 'ATTA', 'ALEX', 'JOHN']
Comment

convert an array to uppercase or lowercase js

var fruits = ["Banana", "Orange", "Apple", "Mango"];
undefined
string = fruits.join(' ').toUpperCase();
// Output"BANANA ORANGE APPLE MANGO"
Comment

js sort strings lowercase and uppercase

["Foo", "bar"].sort(Intl.Collator().compare); //["bar", "Foo"]
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get the value of radio button in jquery 
Javascript :: javascript loop FormData 
Javascript :: object key value as string ts type js 
Javascript :: remove last character from string js 
Javascript :: jquery onclick function 
Javascript :: javascript change url hash 
Javascript :: datatable default sorting 
Javascript :: jquery clear select 2 
Javascript :: javascript onclick href location 
Javascript :: find label jquery 
Javascript :: json_decode jquery 
Javascript :: camera helper three js 
Javascript :: after load page jquery 
Javascript :: sequelize like search 
Javascript :: delegate click in jquery 
Javascript :: react native text area form 
Javascript :: create a new input with type checkbox javascript 
Javascript :: how to detect safari browser in javascript 
Javascript :: conditionally add a property to an object 
Javascript :: how to set session storage in javascript 
Javascript :: react dom 
Javascript :: javascript get age 
Javascript :: get discord.js role 
Javascript :: jsonschema string enum 
Javascript :: node js favicon.ico 
Javascript :: get button text javascript 
Javascript :: javascript random boolean 
Javascript :: jquery select option auto select 
Javascript :: convert/replace space to dash/hyphen javascript 
Javascript :: jquery set input checked 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =