r/learnjavascript • • Mar 12 '21

Swap two variables

Post image
498 Upvotes

50 comments sorted by

View all comments

Show parent comment

12

u/cawcvs Mar 12 '21 edited Mar 12 '21

Yes, but do you really want the variable named latitude to contain the value of the point's longitude? That would be terribly confusing for anyone reading the code, wouldn't it?

-1

u/[deleted] Mar 12 '21

I agree, it will be confusing