Skip to content

Instantly share code, notes, and snippets.

@deepakprasanna
Created May 30, 2011 15:38
Show Gist options
  • Save deepakprasanna/999063 to your computer and use it in GitHub Desktop.
Save deepakprasanna/999063 to your computer and use it in GitHub Desktop.
Some more interesting things that I found
===========================================
1. Empty array has a hidden boolean value of false
arr = []
arr == false // Evaluates to true.
///////////////////////////////////////////////////////////////////
2. Concat
"100" + "10"
=> "10010"
"100" - "10"
=> 90
////////////////////////////////////////////////////////////////////
3.This is kickass. Function can execute by itself!
Don't believe me?? Try this..
(function() { alert("hello")}) (); //Alerts "hello".
Whoa!!!!!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment