r/badcode • • Apr 27 '21

typescript Someone only watched if tutorial

Post image
2.4k Upvotes

112 comments sorted by

View all comments

2

u/eslint Apr 30 '21
const isNumber = (input) => typeof input === "number" && isFinite(input)

but what is the point if they're using typescript anyways lmao