0

Why does Boolean object has length 1 by default

On console logging Boolean object's length, it shows 1 but it doesn't have any default value? or is it?

12th Aug 2020, 12:06 PM
zexu knub
zexu knub - avatar
1 Respuesta
+ 2
Every any object is assigned memory on its declaration, Even though uninitialized. Boolean required just 1 bit so it's length is 1 it shows...
12th Aug 2020, 12:14 PM
Jayakrishna 🇮🇳