Reputation: 13
Do you know how to integrate "continue" in this expression?
arr1[i] != arr2[i] ? false : continue ;
Thank you !
Upvotes: 1
Views: 160
Reputation: 386560
continue
is a statement.
Inside of an conditional (ternary) operator ?:
Javascript expect an expression. Beside that, you take an expression without using it.
You need an if
statement with another statement.
if (arr1[i] == arr2[i]) continue;
Upvotes: 4