Exercise 1: Multiplication Table

Write a JavaScript program to print the multiplication table for a given number.
Example:
Input: 3
Output:
3 x 1 = 3
3 x 2 = 6
3 x 10 = 30

Exercise 2: Nested Loops

Write a JavaScript program using nested loops to generate the following pattern:
Output:
0
00
000
0000
00000

Challenge Exercise: Prime Numbers

Write a JavaScript program to print all prime numbers between 1 and 50.

End of Homework