Function ucfirst in Javascript
Method 1:
function ucfirst(string) { var uppercaseFirstLetter = string.charAt(0).toUpperCase(); return uppercaseFirstLetter + string.slice(1); }
Example:
alert(ucfirst('www.tutorialspots.com'))
Function ucfirst in Javascript
Method 1:
function ucfirst(string) { var uppercaseFirstLetter = string.charAt(0).toUpperCase(); return uppercaseFirstLetter + string.slice(1); }
Example:
alert(ucfirst('www.tutorialspots.com'))