Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Delete item from array

const users = ['item1', 'item2', 'item3'];
// delete 'item2'
delete users['item2']
console.log(users); // ['item1', 'item3']
// another way
console.log(users.splice(1, 1)); // ['item1', 'item3']
Source by love2dev.com #
 
PREVIOUS NEXT
Tagged: #Delete #item #array
ADD COMMENT
Topic
Name
6+7 =