JavaScript shorthand tips and tricks that will save your time | by Amitav Mishra | JavaScript in Plain English

PHOTO EMBED

Fri May 13 2022 15:15:26 GMT+0000 (Coordinated Universal Time)

Saved by @dryadmedia

let x = 'Hello', y = 55; 
//Longhand 
const temp = x; 
x = y; 
y = temp; 

//Shorthand 
[x, y] = [y, x];
content_copyCOPY

https://javascript.plainenglish.io/20-javascript-shorthand-techniques-that-will-save-your-time-f1671aab405f