In SQL Server, I could say:
WHERE X
IN(1,2)
How would you
rewrite the following in
JavaScript:
if (X==1 || X==2)
{}
itemprop="text">
class="normal">Answer
if([1,2].indexOf(x) !==
-1)
No comments:
Post a Comment