New course! Every coder should learn Generative AI!
Try a free lesson+ 1
use the map or filter method with terinary operator on the index of the array element
0
You can use splice to remove element from the original array. You can also use slice to return a new array with elements removed
0
Abhay doing this will have a undefined value in the array