https://github.com/seanmisra/javascript-coding-exercises
40+ JS exercises
https://github.com/seanmisra/javascript-coding-exercises
es6 javascript
Last synced: about 1 month ago
JSON representation
40+ JS exercises
- Host: GitHub
- URL: https://github.com/seanmisra/javascript-coding-exercises
- Owner: seanmisra
- Created: 2023-04-11T21:07:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-27T15:10:05.000Z (over 2 years ago)
- Last Synced: 2025-02-27T20:24:46.040Z (10 months ago)
- Topics: es6, javascript
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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