15 New Practical JavaScript Exercises To Master The Language

15 New Practical JavaScript Exercises To Master The Language

Photo by Antonio Batinić/ Pexels

If you want to learn JavaScript, there are many methods you can employ. You can find some of these in the article linked and another article about JavaScript flashcards.

But a lot of beginners struggle to move from theory to practice. For that purpose I've prepared 20 JavaScript exercises. These are divided into three sections: basic, medium and advanced. That way you can finish them one by one, and take more and more complicated problems to solve. Let's go:

Basic

  1. Write an app that converts units from kilometers to miles
  2. Write a tik-tak-toe game
  3. Write an app that displays a table with surname, name, and age. Data should be stored in an array of objects
  4. Create a car object that offers an information about model, year of production and method to start it and stop. Expose these information and methods in a visual interface
  5. Create a basic 2D game, where you can move a character on the screen with the arrow keys

Medium

  1. Write an app that displays tabular data fetched from an API
  2. Create a car object that offers an information about model, year of production and method to start it and stop. Expose an interface that allows you to see and manage cars, and to create and remove cars
  3. Create a mockup array with temperature readings, where there is one temperature reading per day for a period of one year. Create an interface that displays a graph with these readings
  4. Find an API that delivers weather data. Based on these information display the temperature, humidity and cloudiness. Display visual icons based on the level of these parameter. For example for cloudiness: sun, partially cloudy and cloudy icons. The information should be updated in near real-time.
  5. Create a 2D game with a 20x20 field, a character and randomly placed obstacles. The character should move in a random direction every second. If it will hit an obstacle, it should start the game from start. Visualize the game on the screen.
  6. Write an app that allows people to paste a text. The app detects it and calculates following numbers: numer of characters, words, average length of a word. Numbers should be presented with proper decimal and thousand separators.

Advanced

  1. Write an app that converts dollars to euro using an API that delivers the current exchange rate
  2. Write a tik-tak-toe game that you can play with someone through the internet
  3. Create a mockup array with temperature readings, where there is one temperature reading per day for a period of one year. Create an interface that displays a graph with these readings, min, max and average temperature
  4. Choose a payment provider and implement a payment method in a way that the visitor is asked to make a payment. Once he does it, he gets an access to a wallpaper he can download
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.