Skip to content

jfarmer/exercises-js-fundamentals

Repository files navigation

JavaScript Exercises - Fundamentals

This is a big collection of JavaScript exercises. Within each section, the exercises are roughly ordered from least to most difficult.

We recommend doing the first 3-5 exercises in each section before doing deeper in any single section.

If a particular concept isn't familiar to you, go read the relevant section in the JavaScript crash course.

Feedback

Remember, the goal is not to nail every exercise, but to create good opportunities for feedback. That means:

  1. Devise a clear (but probably incomplete or mistaken) plan
  2. Implement that plan in code as best you can
  3. Get feedback from the computer, peers, and instructors
  4. Revise plan and repeat

JavaScript Crash Course Sections

Here are some quick links to the different sections in the JavaScript crash course.

Numbers

  1. isZero
  2. isPositive
  3. isNegative
  4. isEven
  5. isOdd
  6. remainderOf
  7. isMultipleOf
  8. power
  9. isPowerOf
  10. isPowerOfTwo
  11. isPerfectSquare
  12. factors
  13. isPrime
  14. primeFactors
  15. sumOfRange
  16. factorial
  17. celsiusToFahrenheit
  18. fahrenheitToCelsius
  19. fibonacci

Strings

  1. countLetter
  2. capitalize
  3. longestWord
  4. shortestWord
  5. replaceCharacter
  6. replaceCharacters
  7. toLowercase
  8. toUppercase
  9. toSnakeCase
  10. toTitleCase
  11. rot13
  12. rotN

Branching / Conditionals

  1. daysInMonthByNumber
  2. letterGrade
  3. isValidTriangle
  4. triangleType
  5. rockPaperScissorsWinner

Patterns to Print

  1. printSolidSquare
  2. printSolidRightTriangle
  3. printSolidPyramid
  4. printHollowSquare
  5. printHollowRightTriangle
  6. printHollowPyramid
  7. printInvertedSolidRightTriangle
  8. printMultiplicationTable
  9. printPlus

Arrays

  1. largest
  2. smallest
  3. longest
  4. shortest
  5. sum
  6. mean
  7. median
  8. product
  9. includes
  10. firstIndexOf
  11. lastIndexOf
  12. countEvens
  13. countOdds
  14. countGreaterThan
  15. countLessThan
  16. countValue
  17. selectEvens
  18. selectOdds
  19. selectGreaterThan
  20. selectLessThan
  21. selectLongerThan
  22. selectShorterThan
  23. allPositive
  24. anyPositive
  25. concat
  26. removeEmpty
  27. removeElement
  28. selectAboveMean

About

A collection of JavaScript exercises for new learners

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published