top of page

JavaScript Assignment Help

Task 1

Here you will create an application where a user will be able to create their own works of art.

  1. User specifies width, height, color, left and top and "box" (<div> </div>) is added to the website, ie printed to «output-div», possibly in another way if necessary

  2. The number of boxes added to the website is printed

  3. Also add function to remove all the boxes to be able to restart

Task 2

In this exercise you will simulate a car race. Create the following functionality (it should be fine to expand with 1 and 1 functionality):

  1. On the website there are 3 cars. Every 2 seconds (setInterval is used for this) each car should be driven forward a random distance between 0 and 200 px.

  2. When the first car reaches the finish line (700px or more), it must be printed out who won and all three cars must stop moving.

  3. Prevent the car race from starting before you click a button (you must add HTML for this as well).

Task 3

Attached are 6 pictures of medieval buildings. In this exercise, you will create an application to display them on the website.

You must create one array that contains 6 objects (ie 1 object per building). Each building object should have the following information:

- name

- price

- imageName

- category (you can invent this yourself, but for example «Watchtower», «Barracks» etc.)

The following functionality will be created here:

  1. View all buildings

  2. Show the buildings that are within a minimum and maximum price

  3. View buildings in a category (including showing the number of buildings found in the category)

If the user enters invalid values, or has forgotten to fill in / select something, it must be reported to the user.


bottom of page