Create an Account
username: password:
 
  MemeStreams Logo

When does 10 = 8?

search

Acidus
Picture of Acidus
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Acidus's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
When does 10 = 8?
Topic: Technology 11:47 am EDT, Jun 27, 2007

In octal of course!

var x = 010;
alert(x); //displays 8

In JavaScript, Numeric Literals with leading 0's are treated as octal literals, unless the prefix is 0x, in which case its hex.



 
 
Powered By Industrial Memetics
RSS2.0