Floor Value of a Number with ~~

PHOTO EMBED

Sat May 01 2021 13:51:08 GMT+0000 (Coordinated Universal Time)

Saved by @nikhil3790 #javascript

// Longhand
Math.floor(5.25) === 5 //true
//Shorthand
~~5.25 === 5 //true
content_copyCOPY

https://javascript.plainenglish.io/30-awesome-javascript-shorthand-techniques-that-are-good-to-know-6590545ced3d