JavaScript assignment – basics

1.Write a script that shows a random number between 50 and 100. Do this as long as the user fills in no ( or n ) in your prompt window

2. Bring the table of multiplication for the number 10 to the screen. (in table shape), and give the even and odd rows of other colors.


3. Develop a text adventure game •We make a scenario where we fight a zombie. Before you fight, choose a weapon (for example, a bow and arrow, axe or a chicken). Then you start the fight.

  • Part 1: Develop your game so you have a 50% chance of winning (think Math.random()).
  • Part 2: Try to make your web page attractive and depending on the weapon, your chances of winning increase.

4. The user enters a number between 1 and 10 (via prompt). The program places on the first line 1 asterisk, on the second line 2 asterisks, … The number of lines is indicated by the number specified by the user. If the user enters a number less than 1 or greater than 10, he receives an error message.


5. Create a script that writes all digits from 1 to 20 per 5 in 1 row.

  • 5.1 Output the result in an HTML table with a border of 1.
  • 5.2All even numbers get a certain color, and the odd numbers get a different one.

6. Create a script in which a given word (e.g. dotNETacademy) is shown vertically (all letters below each other).


7. Create a script that writes a given word in each of the following ways:
Brussels
Brusse
Bruss
Brus
Bru
Br
B