10 oddities and secrets about JavaScript
Posted by staff / June 1, 2011Experienced web developers know that JavaScript is a strange and wily mistress. While beautiful, she comes with her share of confusing rules and well-kept secrets. Thankfully, Smashing Magazine is here to decode the questionable curiousities for us. See some of them below:
- NaN is a number.
- An array with no keys = = false (about truthy and falsy).
- replace() can accept a callback function.
More on all ten at Smashing Magazine.
1 tip. Waiting for the 9 others.