Photo by Mohammad Rahmani on Unsplash


Photo by Fahrul Razi on Unsplash


Photo by Ferenc Almasi on Unsplash

Swap variables values without using auxiliary or temporal variables

let a = 1;
let b = 2;
[a,b] = [b,a];
console.log(a); // 2
coonsole.log(b); // 1


Photo by Hello Lightbulb on Unsplash


Photo by Hello Lightbulb on Unsplash



Installation


Photo by Mohammad Rahmani on Unsplash


Photo by National Cancer Institute on Unsplash


Brandon Lara

Full stack developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store