Answers for "function last character return"

0

function last character return

//function to return last character in word 
function lastChar(number){
    const str = number
    console.log(str.charAt(str.length-1));
}

lastChar('sun'); //n
Posted by: Guest on September-05-2021

Code answers related to "function last character return"

Code answers related to "Javascript"

Browse Popular Code Answers by Language