Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

make the first letter of a string upper case

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

how to change the first 3 letters from a string toupper case

function capitalizeFirstLetter(string) {
  return string.charAt(0).toUpperCase() ;
}

console.log(capitalizeFirstLetter('foo')); // Foo
 Run code snippetHide results
Comment

PREVIOUS NEXT
Code Example
Javascript :: find smallest number in array javascript using for loop 
Javascript :: Send Form Data Using Ky AJAX 
Javascript :: img tag in react 
Javascript :: create document mongoose 
Javascript :: javascript combine objects 
Javascript :: regex.match 
Javascript :: classes in es6 
Javascript :: innertext js 
Javascript :: using ejs with express 
Javascript :: media query in jsx 
Javascript :: Example: Export a Variable in Node 
Javascript :: jquery each hover 
Javascript :: mongoose find multiple values one query 
Javascript :: react native "modalize" above bottom navigation 
Javascript :: bootstrap open tab from link data-toggle="tab" 
Javascript :: jQuery hello world program 
Javascript :: javascript image to variable 
Javascript :: js end of string 
Javascript :: @paypal/react-paypal-js 
Javascript :: react display base64 image 
Javascript :: javascript regex named capture group 
Javascript :: bson to json converter 
Javascript :: NextJS + Material-UI - Warning: Prop className did not match 
Javascript :: javascript regex stop at first match 
Javascript :: axios api post request 
Javascript :: jest Your test suite must contain at least one test. 
Javascript :: react grid 
Javascript :: js read a ini file 
Javascript :: how to pass custom regex in jquery validation 
Javascript :: from 0 or 1 to boolean javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =