Frage im Vorstellungsgespräch bei Folio3

Swap 2 numbers without any third variable .

Antwort im Vorstellungsgespräch

Anonym

5. Mai 2021

In JavaScript we can you use array destructing to do that. let a = 2 let b = 3 [ a, b ] = [ b, a ] Now, a = 3, b = 2