Notes On JavaScript

  1. JavaScript has nothing to do with “Java”, not is it an incomplete language because of that latter – “script”.
  2. JavaScript is a “Functional” programming language
  3. Best Book on JavaScript – http://books.google.co.za/books?id=2weL0iAfrEMC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false
  4. JavaScript has Prototypal Inheritance – where objects inherit from other objects. Not classes. This is a class free language.
  5. Javascript makes use of Lamba – use of functions as first class objects
  6. Only one number type in JavaScript – and represented by a 64-bit floating point (double)
  7. NAN – not a number (divide something by zero = NAN). It’s toxic – any arithmetic operation with NAN as an input will have NaN as a result. NAN is not equal to anything; NAN is not NAN
  8. Number(value) – converts 
  9. parseInt(value, radix) – good to put in radix (10 – decimal)
  10. Most useful Math function – takes the integer part of a Number
  11. Strings are “immutable”
  12. Strings you can use double or singe quotes
  13. Strings and Char are the same
  14. String(value) – turns number to string
  15. Null – isn’t anything
  16. Undefined – a variable uninitalized is initialized to Undefined
  17. Falsy Values – false, null, undefined, “”, 0, NAN
  18. All other values are “truthy”
  19. It is a object-orientated language
  20. Loosly – any value can be used, any function
  21. Use === for exact equals (yes three)
  22. JavaScript – every function will return a value 
  23. Object is unordered collection of name value pairs
  24. Object Literal – var myObject = {name: “Jack”, ‘goto’: ‘Jail’, grade: ‘A’} 
Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply