javascript get last character of string
var str = "Hello";
var newString = str.substring(0, str.length - 1); //newString = Hell
javascript get last character of string
var str = "Hello";
var newString = str.substring(0, str.length - 1); //newString = Hell
get last character of string javascript
str.charAt(str.length-1)
how to get lastchar in string in js
//Gettimg the last character of an unknown string;
//using function Expression;
const gettingLastChar = function(userInput){
return userInput.substring(userInput.length -1);
//for Debugging;
let letsDebug = `${userInput.substring(userInput.length -1)}`;
console.log(letsDebug);
}
get the last letter of a string javascript
how to get the last character of a string
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us