Skip to content

Latest commit

 

History

History
45 lines (43 loc) · 1.89 KB

README.md

File metadata and controls

45 lines (43 loc) · 1.89 KB

javascript-coding-exercises

Commits correspond to each exercise

  1. HTML/JS set up
  2. Demonstrate difference between var/let (function vs block scope)
  3. Example of using a rest parameter (pass values individually and using spread syntax)
  4. Diff btw == and ===
  5. Example of array destructuring, including w/ spread syntax
  6. Demonstrate using lambdas with the array functions map/filter/forEach (chaining)
  7. Use JSON to make a hard copy of an object
  8. Use NaN
  9. Callbacks vs. Promise Chaining vs. async/await
  10. Closures - demonstrate usage with a counter
  11. Use of !! (double bang)
  12. Arrays - find vs filter
  13. Arrays - every vs some
  14. Arrays - map vs flatmap
  15. Arrays - shift vs unshift
  16. Arrays - pop vs push
  17. Arrays - reduce (ex: sum)
  18. Undefined vs Null
  19. try/catch/finally basic example
  20. generate a random number between 1 and 5
  21. Get unique values from array with duplicates using Set
  22. 6 falsey values in javascript
  23. Currying - simple example
  24. Object destructuring
  25. Demonstrate how to get out of timer interval (setInterval/clearInterval)
  26. Get/Set/Delete object prop (get 3 different ways)
  27. use continue/break with nested loops (labels)
  28. DOM vs BOM (retrieve a prop from each)
  29. String concatenation (demonstrate how order matters)
  30. Object.freeze() vs Object.seal()
  31. Switch example
  32. Class constructor example (include at least one default value)
  33. Sort an array of objects by a given property
  34. 4 ways to delete an element from an array
  35. Implement Bubble Sort with JS
  36. Implement Binary Search with JS (using recursion)
  37. Use Map to count how many times each element occurs in array
  38. Get HTML in 3 different ways (via DOM)
  39. Write function to determine if stringA can be arranged into stringB (i.e. anagram)
  40. Write function to determine what pairs in array equal a given value (no repeats)
  41. Use fetch API to call API, handle results/errors