showing results for - "function last character return"
Loan
13 Aug 2019
1//function to return last character in word 
2function lastChar(number){
3    const str = number
4    console.log(str.charAt(str.length-1));
5}
6
7lastChar('sun'); //n
similar questions
queries leading to this page
function last character return