Answers for "convert string to uppercase"

49

uppercase string in js

var str = "Hello World!";
var res = str.toUpperCase();  //HELLO WORLD!
Posted by: Guest on July-30-2020
0

string to uppercase

const upperCase = function(names){
    const toLower = names.toLowerCase().split(' ');
    const namesUpper = [];
    for(const wordName of toLower){
        namesUpper.push(wordName[0].toUpperCase() + wordName.slice(1));
    }
    return namesUpper.join(' ');
}
Posted by: Guest on December-31-2020

Code answers related to "convert string to uppercase"

Code answers related to "Javascript"

Browse Popular Code Answers by Language