Console.log output in javascript

后端 未结 6 541
闹比i
闹比i 2021-01-01 01:22

Why do console.log(00); and console.log(01); print 0 & 1 in the browser console and not 00 & 01?

console.log(00); // prints         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 01:39

    Cause console.log always shows in DEC format. For example: 011 is 11 in OCT, and 9 in DEC.

提交回复
热议问题