Answers for "how to get last r in javascript"

28

javascript get last character of string

var str = "Hello";
var newString = str.substring(0, str.length - 1); //newString = Hell
Posted by: Guest on July-23-2019
7

how to remove last element in js

var array = [1, 2, 3, 4, 5, 6];
array.pop();
console.log(array);
//Output in console section:
//[1, 2, 3, 4, 5]
Posted by: Guest on August-06-2020

Code answers related to "how to get last r in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language