+ 2

What is the meanin of "~~" sign?

i see codes use: ~~Math.random... What is the use?

26th Oct 2018, 7:25 AM
Jingga Sona
Jingga Sona - avatar
4 Answers
+ 4
~ is the bitwise NOT operator. First, it gets rid of the decimal place (if any), then, it ā€œnotsā€ the number. Two ~s would: first get rid of the decimal place, second ā€œnotā€ the number, then third ā€œnotā€ the new number again. That would get rid of the decimal place, so it’s the same as Math.floor. Further info on bitwise NOT: https://www.sololearn.com/learn/4076/?ref=app
26th Oct 2018, 7:41 AM
Rowsej
Rowsej - avatar
+ 3
Jingga Sona 🐺 [HOWLING] No worries! Also... 🐤 me chicken [PECKING]!
26th Oct 2018, 7:48 AM
Rowsej
Rowsej - avatar
+ 2
Rowsej lol šŸ˜‚šŸ˜‚
26th Oct 2018, 7:49 AM
Jingga Sona
Jingga Sona - avatar
+ 1
Rowsej oh i get it! Thanks again!😊😊😊
26th Oct 2018, 7:45 AM
Jingga Sona
Jingga Sona - avatar