- 1. JavaScript Programming
- 2. Introduction to JavaScript
- 2.1. History of JavaScript
- 2.2. About JavaScript
- 2.3. JavaScript editors, IDEs
- 2.4. alert
- 2.5. Document.write
- 2.6. confirm
- 2.7. prompt
- 2.8. console
- 2.9. Separate script to its own file
- 2.10. Comments in JavaScript
- 2.11. Bad Comments in JavaScript
- 2.12. Literal values in JavaScript (numbers, strings, booleans, etc.)
- 2.13. Examples for generating Infinite and NaN (not a number)
- 2.14. var - variables in JavaScript
- 2.15. Variables without var
- 2.16. use strict
- 2.17. use strict + var
- 2.18. Scope of variables
- 2.19. Exercise: Set up environment for web browser
- 2.20. Exercise: Set up environment for command line
- 2.21. Exercise: Set up development environment
- 2.22. Exercise: Hello World
- 3. JavaScript basics
- 3.1. Numerical Operators
- 3.2. String operations
- 3.3. String index and slice
- 3.4. indexOf, lastIndexOf
- 3.5. substr, slice, and substring
- 3.6. Concatenate strings
- 3.7. Replace substring
- 3.8. Mixing numbers and strings
- 3.9. Converting between numbers and strings
- 3.10. Convert octal, hexa
- 3.11. Converting decimal to hexa
- 3.12. Browser IO (HTML)
- 3.13. Browser IO (JavaScript)
- 3.14. Exercise: Hello World on pressing button
- 3.15. Solution: Hello World on pressing button
- 3.16. Exercise: Add two numbers
- 3.17. Solution: Add two numbers
- 3.18. Variable definition
- 4. Conditionals in JavaScript
- 4.1. if statement
- 4.2. Double equal (==) issues in JavaScript
- 4.3. Compare values using == in JavaScript
- 4.4. Compare values using === in JavaScript
- 4.5. Comparision operators
- 4.6. Comparision operators - examples
- 4.7. Booleans: true and false
- 4.8. Falsy values in JavaScript
- 4.9. Truthy values in JavaScript
- 4.10. Logical operators
- 4.11. Toggle boolean
- 4.12. Convert Truthy and Falsy values to boolean
- 4.13. Short circuit
- 4.14. if - else
- 4.15. else if
- 4.16. Switch (case) in JavaScript
- 4.17. Math.round
- 4.18. Rounding up a float to integer (ceil)
- 4.19. Rounding down a float to integer (floor)
- 4.20. Converting float to integer (trunc)
- 4.21. Math.random
- 4.22. Throw a dice (random integers 1-6)
- 4.23. Exercise: Calculator
- 4.24. Solution: Calculator
- 4.25. Exercise: Guess number
- 4.26. Solution: Guess number
- 5. Arrays in JavaScript
- 5.1. for-loop
- 5.2. while loop
- 5.3. Break out from while loop in JavaScript
- 5.4. An infinite while loop
- 5.5. Continue to next in while loop in JavaScript
- 5.6. do-while loop in JavaScript
- 5.7. new Array
- 5.8. Literal array: []
- 5.9. Enlarge array with elements
- 5.10. JavaScript Arrays - pop - push
- 5.11. JavaScript Arrays - shift - unshift
- 5.12. Two dimensional array (matrix)
- 5.13. For-in loop on array
- 5.14. ForEach loop on array
- 5.15. Reverse array
- 5.16. Concatenate arrays
- 5.17. Concatenate array with object
- 5.18. Concatenate array is shallow
- 5.19. Array indexOf lastIndexOf
- 5.20. Array slice (range) or splice
- 5.21. Split string, join array
- 5.22. Deep copy with JSON
- 5.23. Exercise: Count digits
- 5.24. Solution: Count digits
- 5.25. Exercise: Count characters
- 5.26. Solution: Count characters
- 5.27. Exercise: Number guessing - history
- 5.28. Solution: Number guessing - history
- 5.29. Exercise: Number guessing
- 5.30. Exercise: Reverse the number guessing game
- 5.31. Solution: Reverse the number guessing game
- 6. JavaScript functions
- 6.1. Function statements
- 6.2. Function expressions (Anonymous functions)
- 6.3. Unknown number of function arguments
- 6.4. Assign function
- 6.5. Passing functions as parameter of another function
- 6.6. Recursive function
- 6.7. Dispatch table
- 6.8. Variable scope
- 6.9. Scope in if block
- 6.10. Variable in for loop
- 6.11. Immediate Execution using ()
- 6.12. Immediate Execution with parameters using ()
- 6.13. Private Global Scope
- 6.14. Exercise: Reverse Polish Calculator
- 6.15. Reverse Polish Calculator in JavaScript
- 6.16. Order
- 7. JavaScript Objects
- 7.1. new empty object
- 7.2. new Objects
- 7.3. new Object with attribute
- 7.4. Literal Objects
- 7.5. Dumping data structures (for debugging)
- 7.6. Access JavaScript object attributes
- 7.7. Change JavaScript object attributes
- 7.8. Add JavaScript object attributes
- 7.9. Delete property from object
- 7.10. for-in loop on JavaScript object
- 7.11. Count words
- 7.12. Count words fixed
- 7.13. keys of an object
- 8. Advanced JavaScript
- 8.1. Stringify NaN, Infinite, and null
- 8.2. JSON parsing NaN, Infinite, and null
- 8.3. JSON parsing NaN, Infinite, and null (Node.js" %}
- 8.4. typeof
- 8.5. typeof and null
- 8.6. Delayed (scheduled) execution - setTimeout
- 8.7. Recurring execution - setInterval
- 8.8. Stop recurring execution - clearInterval
- 8.9. Dates
- 8.10. sort
- 8.11. sort object
- 8.12. sort datestrings
- 8.13. map
- 8.14. Closures in JavaScript
- 8.15. Exception handling
- 8.16. NodeJS: command line arguments
- 8.17. NodeJS: prompt on STDIN
- 8.18. Transliterate
- 9. RegExp - Regular Expressions in JavaScript
- 9.1. RexExp Object
- 9.2. Match
- 9.3. Substitute
- 9.4. RegExp cheat sheet
- 10. DOM - Document Object Model
- 10.1. Inject content in HTML
- 10.2. Add event listener
- 10.3. Get value of input box
- 10.4. Get value of selected option
- 10.5. Update selection box based on other selection
- 10.6. Autoresizing Grid
- 10.7. Local storage - counter
- 10.8. Remove item from local storage - reset counter
- 10.9. Clear local storage
- 10.10. Local storage - boolean
- 11. Other
- 11.1. Date
- 11.2. Try Catch
- 12. Application
- 12.1. Install NodeJS
- 13. JavaScript Appendix
- 13.1. Resources
- 13.2. JavaScript Videos
- 13.3. JavaScript Tools
- 13.4. Reserved words in JavaScript
- 13.5. Awful parts
- 13.6. Bad Parts
- 13.7. JSLint
- 13.8. Deep copy
- 13.9. Invocation patterns
- 13.10. Apply
- 13.11. getElementsByClassName