Answers for "remove the last spilt js"

103

js remove last character

let str = "Hello Worlds";
str = str.slice(0, -1);
Posted by: Guest on January-16-2020
1

remove last from array javascript

var fruits = ["Banana", "Orange", "Apple", "Mango"];
document.write(fruits);
document.write("<br>");
fruits.pop();

document.write(fruits)
Posted by: Guest on April-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language