30-seconds-of-code: Swap values of two variables

Created on 16 Dec 2017  路  4Comments  路  Source: 30-seconds/30-seconds-of-code

This is not a function really. It's just a tip on how to swap values of 2 variables. However, it is really useful for someone who is new to ES6 syntax.

Both @Chalarangelo and me think that _30-seconds-of-code_ should be consistent and focus only on functions and with that in mind swap values of two variables doesn't really fit in here.

What do you think about the whole situation with it? Should we keep it?

opinions needed question

All 4 comments

Like I said on gitter, we should probably remove it. It's a useful tip, but we want functions to work as-is (and be functions actually), so I suggest we get rid of it.

I taught about making a function that does it but it doesn't make sense since syntax already allows for it very easily. I also think we should remove it.

Ok, I'm closing and removing the snippet. We should be fine with that.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

konglx90 picture konglx90  路  6Comments

atomiks picture atomiks  路  6Comments

Greenheart picture Greenheart  路  3Comments

Priyansh2001here picture Priyansh2001here  路  5Comments

larrybotha picture larrybotha  路  3Comments