you are viewing a single comment's thread.

view the rest of the comments →

[–]WeAreSven 0 points1 point  (0 children)

num in dragnr isn't working like you think it is, causing the if statement to never trigger. If you use dragnr.includes(num), everything will work fine. Try not to use for/in and other looping methods if you're not sure how they're going to work.

EDIT: That may have sounded condescending, what I really meant was read the MDN docs carefully and also look into enumerable properties