Don’t iterate over arrays using for...in. That syntax is for iterating over the properties of an object, which isn’t what you’re after.
As for your actual question, you can use the continue:
var y = [1, 2, 3, 4];
for (var i = 0; i < y.length; i++) {
if (y[i] == 2) {
continue;
}
console.log(y[i]);
}
This will print:
1
3
4
Reference Link – https://stackoverflow.com/questions/15034763/how-to-skip-to-next-in-javascript-in-a-for-in-with-a-while-inside









![SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes](https://blog.rahulbhutani.com/wp-content/uploads/2020/04/123-218x150.jpg)




