Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Move capital letters to the beginning

const result = [...'Hello World Foo Bar']
  .sort((a, b) => /[A-Z]/.test(a) ? /[A-Z]/.test(b) ? 0 : -1 : 0)
  .join('');
return result;
Comment

PREVIOUS NEXT
Code Example
Javascript :: phaser3 simple player controll 
Javascript :: 555 
Javascript :: javascript 2021 
Javascript :: Call this API in order to fetch the user data. API: https://jsonplaceholder.typicode.com/users. 
Javascript :: getauth firebase admin node.js 
Javascript :: debounce getx 
Javascript :: HSETNX in redis 
Javascript :: mogoose schema to add json as a property 
Javascript :: javascript alert when site page opened not in chrome 
Javascript :: postgresql nodejs 
Javascript :: javascript every nested array 
Javascript :: redux-persist 
Javascript :: schema 
Javascript :: sort array method 
Javascript :: input variable in string javascript 
Javascript :: react native smart splash screen 
Javascript :: javascript keyboard shortcuts 
Javascript :: usesearchparams react router 
Javascript :: javascript run function 
Javascript :: react-native spinner 
Javascript :: object.assign in express 
Javascript :: alert react native 
Javascript :: js find 
Javascript :: scarping js 
Javascript :: root of any number javascript 
Javascript :: es6 hashset 
Javascript :: to htmlhow can i add the list in javascript 
Javascript :: currying function callback javascript 
Javascript :: react code input 
Javascript :: how to get font size in javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =