0
i defined var x = 0704 ; and the o/p was 452 .can some one explain why
is there some limit to var
11 Réponses
+ 9
Because that's how you define an octal in JS, it starts with 0.
+ 9
This is octal system, 0704 = 8×8×7 + 4 = 452.
+ 9
I don't know really, HEX (base 16) can be used for memory addresses but octal I'm not sure I never used it.
+ 8
Octal number system is based on the number 8. Starting from the right you have 4×8^0 which is 4, then the second number is 0, which is 0×8^1 = 0. Third number is 7, so it is 7×8^2. You add them all up and you get 452...
+ 8
No, any number that starts with 0. Like 0704, or 071111 or whatever.
0
please dumb down the answer for me i dnt get it
0
ooh. gawd thanks great help but how did you came to know its an octal system not the decimal system
0
any four digit number will be cosidered as octal system is this what u r saying
0
now i got you thankz
0
but how does octal systm help ?
0
cool