Is there such a thing as a “bit” in JavaScript?

I know there is a Boolean object in JavaScript , but I'm wondering if there is a way to access the raw metal single bitthat underlies this Boolean object.

+5
source share
2 answers

I don't know any type bitin javascript. If you are concerned about saving space and the need to store a lot of bits, you probably can use intand Bitwise Operators . You will be manipulating individual bits within each int (therefore 32 on most systems)

+3
source

, , true 1 false is 0.

+3

All Articles