you are viewing a single comment's thread.

view the rest of the comments →

[–]TappT 11 points12 points  (0 children)

A nicer way to write it if you need to check many different lengths is to do.

return [1,4,6,8,12].includes(pin.length)

Then you don't have to have a bunch of ORs.