Skip to content

jfarmer/exercises-js-fundamentals-ii

Repository files navigation

Exercises - JavaScript Fundamentals II

These exercises require involve all the building-blocks of JavaScript with a healthy dose of problem solving. Tackle them in any order. Scan through each first to see which one interests you the most.

Exercises

Remember, as a beginner you're probably prone to two things:

  1. Diving head-first into the code
  2. Focusing on the syntax and not your own model of the problem

Each of these exercises is something you can already do by hand. Use that to your advantage. Slow down, step out of the code, and play with simple examples to make your intuition more precise.

In formatSeconds, you're asked to turn an integer representing a total number of seconds into a nicely formatted string.

In addCommas, you're asked to write a function that formats a number by inserting commas in the appropriate places.

For example, converting 12345 to '12,345'.

In toRoman, you're asked to write a function that takes a number and returns a string containing its representation in Roman numerals.

For example, converting 1327 to 'MCCCXXVII'. We explain how Roman numerals work if you've never seen them before or don't remember.

In numberToEnglish, you're asked to write a function that converts an integer to its english equivalent.

For example, converting 12345 to 'twelve thousand three hundred forty five'.

In runLengthEncode, you're asked to implement a simple compression algorithm called run-length encoding.

In runLengthDecode, you're asked to write a function that decompresses strings compressed using run-length encoding.

Do runLengthEncode first.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published