Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to make last letter of string uppercase in javascript

function endCaseWords(input) {
    return input.toLowerCase().split(" ").map(function(item) {
        return item.slice(0, -1) + item.slice(-1).toUpperCase();
    }).join(" ");
}

document.write(endCaseWords("Party like its 2015"));
 Run code snippet
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to multiply two array in javascript 
Javascript :: reverse an array in javascript 
Javascript :: remove element 
Javascript :: form submit with ajax 
Javascript :: window handles 
Javascript :: symfony iterate over entity 
Javascript :: shell curl path of json file as parameter without temporal file 
Javascript :: pageSize useEffect 
Javascript :: number of filters 
Javascript :: creating a react app from scratch 
Javascript :: tempusdominus calendar out of background size 
Javascript :: TypeError: Invalid schema configuration: `True` is not a valid type at path `id.required`. See https://bit.ly/mongoose-schematypes for a list of valid schema types.] 
Javascript :: react native pass params to previous screen 
Javascript :: sort used in price high and low using angular 
Javascript :: p5.js sketch 
Javascript :: react-folder tree example 
Javascript :: image gallery functions 
Javascript :: javascript Change color based on a keys value in each object of array 
Javascript :: -1 in js 
Javascript :: How to append variable with anchor element href link in Angularjs 
Javascript :: Angular js Directive to Fire "click" event on pressing enter key on ANY element 
Javascript :: List of data with buttons that should display the rest of the data below 
Javascript :: how to edit data retrieval using jsp 
Javascript :: js generate pnh 
Javascript :: Express.js View "globals" 
Javascript :: open 2 links with one click html jquery 
Javascript :: iterate over element parent jquery 
Javascript :: phaser time event start at 
Javascript :: array loop pyramid js 
Javascript :: pass a react component as a prop from another component 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =