Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove a variable from an array javascript

let colors = ["red","blue","car","green"];
//remove car from the colors array
colors.splice(color[2]); // colors = ["red","blue","green"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #variable #array #javascript
ADD COMMENT
Topic
Name
7+5 =