javascript capitalize first letter
JavaScript
//capitalize only the first letter of the string.
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
//capitalize all words of a string.
function capitalizeWords(string) {
return string.replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
};function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
console.log(capitalizeFirstLetter('foo bar bag')); // Fooconst lower = 'this is an entirely lowercase string';
const upper = lower.charAt(0).toUpperCase() + lower.substring(1);
Also in JavaScript:
- Title
- get width of a dom element js
- Category
- JavaScript
- Title
- bootstrap checkbox
- Category
- JavaScript
- Title
- detect browser javascript
- Category
- JavaScript
- Title
- check multiple ifield if it's blank in jquery
- Category
- JavaScript
- Title
- javascript add scroll listener
- Category
- JavaScript
- Title
- disable autocomplete javascript
- Category
- JavaScript
- Title
- flutter cache json
- Category
- JavaScript
- Title
- bash parse json
- Category
- JavaScript
- Title
- delete node between indexes node list js
- Category
- JavaScript
- Title
- get date now javascript
- Category
- JavaScript
- Title
- how to find remainder in javascript
- Category
- JavaScript
- Title
- es6 class example
- Category
- JavaScript
- Title
- import vue js
- Category
- JavaScript
- Title
- javascript anagram check
- Category
- JavaScript
- Title
- javascript array to csv string
- Category
- JavaScript
- Title
- day to week
- Category
- JavaScript
- Title
- app script append two list
- Category
- JavaScript
- Title
- call javascript function from html
- Category
- JavaScript
- Title
- capturar el valor de un input con jquery
- Category
- JavaScript
- Title
- how to make a property important in javascript
- Category
- JavaScript
- Title
- event listener on parent not on childjavascript
- Category
- JavaScript
- Title
- how to a property from a JavaScript object
- Category
- JavaScript
- Title
- javascript break inner loop only
- Category
- JavaScript
- Title
- filter out arrays js
- Category
- JavaScript
- Title
- explode in jquery
- Category
- JavaScript
- Title
- display none in jquery
- Category
- JavaScript
- Title
- if (req.url === "/script.js")
- Category
- JavaScript
- Title
- access to static file nodejs
- Category
- JavaScript
- Title
- convert dictionary to json serialization swift 4
- Category
- JavaScript
- Title
- angular 6 reload current page
- Category
- JavaScript
- Title
- javascript ascending and descending
- Category
- JavaScript
- Title
- copy file javascript
- Category
- JavaScript
- Title
- can we import jquery library from developer tools
- Category
- JavaScript
- Title
- for of and for in javascript
- Category
- JavaScript
- Title
- creating an object javascript
- Category
- JavaScript
- Title
- how to use a fixed time zone in nodejs
- Category
- JavaScript
- Title
- How to send JSON Web Token (JWT Token) as header with Postman and golang
- Category
- JavaScript
- Title
- delegate jquery
- Category
- JavaScript
- Title
- add new items in a select input using js
- Category
- JavaScript
- Title
- autocomplete typeahead ajax
- Category
- JavaScript
- Title
- angular material multi select ngmodel
- Category
- JavaScript
- Title
- hide component on click vue
- Category
- JavaScript
- Title
- how to instialise var in js
- Category
- JavaScript
- Title
- how to log an array in javascript
- Category
- JavaScript
- Title
- angular calendar updating until hovering
- Category
- JavaScript
- Title
- how to get last string in javascript
- Category
- JavaScript
- Title
- arrow function in javascript w3schools
- Category
- JavaScript
- Title
- how to compare strings javascript
- Category
- JavaScript
- Title
- can't modify range value js
- Category
- JavaScript
- Title
- do more than one thing at start of or loop javascript
- Category
- JavaScript
- Title
- get url javascript
- Category
- JavaScript
- Title
- dockerfile for nodejs
- Category
- JavaScript
- Title
- how to convert array to uppercase in javascript
- Category
- JavaScript
- Title
- add jquery to wordpress
- Category
- JavaScript
- Title
- async iife
- Category
- JavaScript
- Title
- How to create a nested schema in apollo graphql server
- Category
- JavaScript
- Title
- create array with specific size javascript
- Category
- JavaScript
- Title
- Date gethours js
- Category
- JavaScript
- Title
- how to javascript
- Category
- JavaScript
- Title
- download jquery
- Category
- JavaScript
- Title
- expressjs query params
- Category
- JavaScript
- Title
- add custom marker in react-mapbox-gl
- Category
- JavaScript
- Title
- Javascript case insensitive string comparison
- Category
- JavaScript
- Title
- how to freeze js object
- Category
- JavaScript
- Title
- array data structure javascipt interview questions
- Category
- JavaScript
- Title
- angular subscribe
- Category
- JavaScript
- Title
- javascript check if string ends with
- Category
- JavaScript
- Title
- convert a int to a unicode javascript
- Category
- JavaScript
- Title
- icon shwoing a box react native vector icons
- Category
- JavaScript
- Title
- how to create response time router node js
- Category
- JavaScript
- Title
- append array js
- Category
- JavaScript
- Title
- copy array javascript
- Category
- JavaScript
- Title
- compare dates in javascript
- Category
- JavaScript
- Title
- how to run function after animation complete jquery
- Category
- JavaScript
- Title
- angular bootstrap not working
- Category
- JavaScript
- Title
- how to substract date object javascript
- Category
- JavaScript
- Title
- hide show div jquery
- Category
- JavaScript
- Title
- how to paste in input field react native
- Category
- JavaScript
- Title
- adding cors parameters to extjs ajax
- Category
- JavaScript
- Title
- how to add row in angular dynamically
- Category
- JavaScript
- Title
- how to map over arrays vuejs
- Category
- JavaScript
- Title
- enter event in jquery
- Category
- JavaScript
- Title
- how to check chrome version in js
- Category
- JavaScript
- Title
- erela client userID
- Category
- JavaScript
- Title
- ajax request qml
- Category
- JavaScript
- Title
- discord.js
- Category
- JavaScript
- Title
- Appending the option element using jquery each function
- Category
- JavaScript
- Title
- electron new window
- Category
- JavaScript
- Title
- events js 292 throw er Unhandled 'error' event ^ Error getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0 at GetAddrInfoReqWrap.onlookup [as oncomplete]
- Category
- JavaScript
- Title
- angular flex layout
- Category
- JavaScript
- Title
- for of array javascript
- Category
- JavaScript
- Title
- history.pushstate
- Category
- JavaScript
- Title
- how to empty form after submit react
- Category
- JavaScript
- Title
- how to start react
- Category
- JavaScript
- Title
- Finding HTML Element by Id
- Category
- JavaScript
- Title
- how to access a database in express
- Category
- JavaScript
- Title
- angular two way property binding
- Category
- JavaScript
- Title
- express get params after ?
- Category
- JavaScript
- Title
- bubble sort
- Category
- JavaScript
- Title
- how to use componentdidmount in functional component
- Category
- JavaScript