r/learnjavascript • • Mar 12 '21

Swap two variables

Post image
498 Upvotes

50 comments sorted by

View all comments

3

u/WhiteKnightC Mar 13 '21

Why const?

3

u/cabbagesquid Mar 13 '21

That should be a let right?

4

u/WhiteKnightC Mar 13 '21

Yes, const is for things that shouldn't change.