Code output confusion | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Code output confusion

When I run this code the output is error but In the solution of this problem the output is 1 how it possible? <script> var a=true; var b="01"; alert(number(a==b)); </script>

4th Apr 2019, 9:14 AM
KHUSHbu
KHUSHbu - avatar
2 ответов
+ 5
The 'n' of number should be in capital letter: var a=true; var b="01"; alert(Number(a==b)); //capital N
4th Apr 2019, 9:47 AM
VEDANG
VEDANG - avatar
+ 2
Ohh thanks 😊
4th Apr 2019, 9:51 AM
KHUSHbu
KHUSHbu - avatar