-
Notifications
You must be signed in to change notification settings - Fork 7
/
questions.txt
15 lines (11 loc) · 966 Bytes
/
questions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Q1. Create a Function to Wish a User Happy Birthday, Ask User Date and Month and if it match with today data and month wish him/her
Hint: prompt function for user input
Q2. Enter the Age and Compute Total Weeks in a Human Life
Q3. Create a Template for Love Letter
Q4. A Sandwich Calculator
1. Write a function called sandwich calculator. This should accept one value: bread
2. The function should return the total number of possible sandwiches based on the amount of breads available. I need 2 breads to make one sandwich, so if there are 10 breads, it should return 5. Test your function with console.log.
3. Extend your function so it accepts two values, bread and cheese.
4. It takes two sbreads and one cheese to make a sandwich. The function should return the total number of possible sandwiches, so if there are breads, but only 1 cheese, it should return 1.
Q5. Add the Following Case in add function
a) add(10,[1,"2",3],[one, "Amit", two,"100"],"20")