Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #function #character #return
ADD COMMENT
Topic
Name
1+7 =