

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the "double tilde" (~~) operator in JavaScript?
The “double tilde” (~~) operator is a double NOT Bitwise operator. Use it as a substitute for Math.floor(), since it’s faster.
Example
You can try to run the following code to learn about double tilde operator −
<html> <body> <script> var a = 2; var b,c, d; b = ~~a; c = Math.floor(a); d = ~~b=== c; document.write(b); document.write("<br>"+c); document.write("<br>"+d); // They are equal </script> </body> </html>
- Related Questions & Answers
- What is tilde (~) operator in Python?
- What is the use of tilde operator (~) in R?
- What is the Kotlin double-bang (!!) operator?
- What is double address operator(&&) in C++?
- What does the Double Star operator mean in Python?
- What is the !! (not not) operator in JavaScript?
- What is increment (++) operator in JavaScript?
- What is decrement (--) operator in JavaScript?
- What is Conditional Operator (?:) in JavaScript?
- What is typeof Operator in JavaScript?
- What is Modulus Operator (%) in JavaScript?
- What is Multiplication Operator (*) in JavaScript?
- What is Addition Operator (+) in JavaScript?
- What is Assignment Operator (=) in JavaScript?
- What is Comma Operator (,) in JavaScript?
Advertisements