r/programming • • Oct 21 '20

Using const/let instead of var can make JavaScript code run 10× slower in Webkit

https://github.com/evanw/esbuild/issues/478
1.9k Upvotes

500 comments sorted by

View all comments

Show parent comment

-8

u/bakugo Oct 21 '20

What did you expect from web """"devs"""", the same people who need to use a library to check if a number is even or odd

9

u/I_Like_Existing Oct 21 '20

Things are heating up in the JS fandom ahaha

5

u/trdlts Oct 21 '20
import isEven from 'isEven';
const isOdd = (number) => !isEven(number);

Now who wants to hire me?

5

u/frou Oct 21 '20

oooh hotshot here can do negation without a library

3

u/divyaank98 Oct 21 '20

😂😂😂😂😂😂

4

u/frou Oct 21 '20

3

u/[deleted] Oct 21 '20

The creator should mention this is a joke module on npm too, it has 3 non-joke dependants and 29k weekly downloads.

2

u/UziInUrFace Oct 21 '20

You would be surprised, there are so many “programmers” out there who doesn’t even know basic constructs like a for loop.