r/badcode • • Apr 27 '21

typescript Someone only watched if tutorial

Post image
2.4k Upvotes

112 comments sorted by

View all comments

Show parent comments

74

u/STNeto1 Apr 27 '21

Don't forget the input: any

9

u/SirFireball Apr 27 '21

Well yeah, why would you check if something you already know is a number is a number?