Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

first letter tuUppercase

const string = "tHIS STRING'S CAPITALISATION WILL BE FIXED."
const string = string[0].toUpperCase() + string.slice(1)
Comment

make first letter capital

const names = ["alice", "bob", "charlie", "danielle"]
// -->        ["Alice", "Bob", "Charlie", "Danielle"]

//Just use some anonymous function and iterate through each of the elements in the array
//and take string as another array
let namescap = names.map((x)=>{
    return x[0].toUpperCase()+x.slice(1)
    
})
console.log(namescap)
Comment

make the first letter of a string upper case

>>> "hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Comment

first letter uppercase js

const lower = 'this is an entirely lowercase string';
const upper = lower.charAt(0).toUpperCase() + lower.substring(1);
Comment

Uppercase first letter of variable

var str = "hello world";
str = str.toLowerCase().replace(/[a-z]/g, function(letter) {
    return letter.toUpperCase();
});
alert(str); //Displays "Hello World"
Comment

name first letter uppercase

// name er first letter uppercase 
let name = "aminul islam rasel" //Aminul Islam Rasel

        let word = name.split(" ") // create  array each word
        word[0] = word[0].charAt(0).toUpperCase() + word[0].slice(1)
        word[1] = word[1].charAt(0).toUpperCase() + word[1].slice(1)
        word[2] = word[2].charAt(0).toUpperCase() + word[2].slice(1)

        name = word.join(" ")// get Aminul Islam Rasel

        console.log(name);//show console


// array map method use kore
  let name = "abdur razzak hassan tusher mafus ulla"
        let word = name.split(" ")
        word = word.map(function (value) {
            return value.charAt(0).toUpperCase() + value.slice(1)
        })

        name = word.join(" ")
        console.log(name);
Comment

first name capital letter


function firstCapitalLetter(name){
    return name[0].slice('').toUpperCase() + name.slice(1).toLowerCase()
}


 console.log(firstCapitalLetter('front '))
Comment

Capitalize first letter

String name;

BufferedReader br = new InputStreamReader(System.in);

String s1 = name.charAt(0).toUppercase());

System.out.println(s1 + name.substring(1));
Comment

first Letter as Capital

string.charAt(index)
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript array loop 
Javascript :: nuxt get client windows size 
Javascript :: GET method firebase realtime database react 
Javascript :: get width of screen 
Javascript :: numero aleatorio javascript 
Javascript :: validateDOMNesting(...): <div cannot appear as a descendant of <p. 
Javascript :: what is new set in javascript 
Javascript :: try catch js 
Javascript :: how to get the last element in javascript 
Javascript :: javascript iterate through an object 
Javascript :: how to use nodemailer 
Javascript :: start date time picker from day to year in html 
Javascript :: find how many similar object item in an array in javascript 
Javascript :: start live server react js 
Javascript :: jquery call a class 
Javascript :: react route multiple components 
Javascript :: jquery validate add rules dynamically 
Javascript :: jquery label with text 
Javascript :: how to compare previous value with current in javascript 
Javascript :: js access array in array 
Javascript :: axios post request progress 
Javascript :: back button event listener javascript 
Javascript :: react-native make android apk 
Javascript :: wait until 
Javascript :: move last element of array to beginning javascript 
Javascript :: repeat js 
Javascript :: react routes multiple compoenents 
Javascript :: jquery form validation 
Javascript :: how to separate string elements in javascript 
Javascript :: sort array based on multiple columns javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =