News for hackers. Stuff that matters.
Re:Oddities about JavaScript by voidr on Monday May 30, 2011 @02:16PM (#2600035)
> 9. 0.1 + 0.2 !== 0.3

You get this in most other programing languages too.

> 8. Firefox Reads and Returns Colors in RGB, Not Hex

The title says JavaScript, this is the DOM.

> 7. Functions Can Execute Themselves

Why is this so odd? I feel the author is too biased towards other languages. Also his example totally misses to point of closures.

> 6. You Can Fake Scope

No you can't fake scope, you override it. Why is this so odd? Again the author is not looking at it correctly, this is natural if you use it correctly.

Most of this article seems to come from someone who didn't really use JavaScript a lot, hence there is a lot of bias and prejudice. All you need to do is tell yourself that classical OOP is not the only way to code, and you will see that most of those things are really good stuff and not oddities.

There are no comments on this comment yet.