Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

function titleCase

function titleCase(str) {
  const newTitle = str.split(" ");
  const updatedTitle = [];
  for (let st in newTitle) {
    updatedTitle[st] = newTitle[st][0].toUpperCase() + newTitle[st].slice(1).toLowerCase();
  }
  return updatedTitle.join(" ");
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript goto or redirect to page 
Javascript :: how to store new object made by constructor classes data in local storage using javascript 
Javascript :: ONDC node 
Javascript :: disable scroll increment in react js number type 
Javascript :: check for overlapping time javascript 
Javascript :: Has many belongs to database relations nodejs 
Javascript :: camelcase to css variable javascript 
Javascript :: How to Loop Through an Array with a for…of Loop in JavaScript 
Javascript :: wait untill 2 
Javascript :: Backbone Model Fetch 
Javascript :: name of javascript virtual machine for apple 
Javascript :: how to properly make the navbar to be fixed to the top in react.jsx 
Javascript :: document.getelementbyid add number 
Javascript :: Solution-4--solution options for reverse bits algorithm js 
Javascript :: jquery try catch 
Javascript :: code for random password generator in javascript 
Javascript :: javascript add button 
Javascript :: var vs let javascript 
Javascript :: js DFS 
Javascript :: javascript add item to array 
Javascript :: generate a link with javascript 
Javascript :: javascript set size 
Javascript :: _.isString 
Javascript :: javascript handle updation of copy object 
Javascript :: javascript Accessing Object Methods 
Javascript :: JavaScript Destructuring - Before ES6 
Javascript :: javaScript values() Method 
Javascript :: json syntax 
Javascript :: javascipt 
Javascript :: Cntrlsss:$.Control-Ai 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =