Answers for "uppercase capitalize each word in array"

2

javascript uppercase first letter of each word

const str = 'captain picard';

function capitalize(str) {
  return str.charAt(0).toUpperCase() + str.slice(1);
}

const caps = str.split(' ').map(capitalize).join(' ');
caps; // 'Captain Picard'
Posted by: Guest on October-27-2020
-1

how to convert array to uppercase in javascript

var a = ['this','is','test'];

a.map(f=>{ return f.toUpperCase(); });
Posted by: Guest on June-17-2020

Code answers related to "uppercase capitalize each word in array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language