You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
418 B
JavaScript

let users = ["Dwayne Johnson","Steve Austin","Kurt Angle","Dave Bautista"];
console.log("Original Array:")
console.log(users);
function deleteItem(users){
users.length=users.length - 1 ;
return users;
}
console.log(users.length - 1 );
console.log(users);
let users1= 'Dave Bautista';
console.log(users1);
deleteItem(users);
console.log(users)
let lastItem = deleteItem(users);
console.log(lastItem);