Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 1.21 KB

22-basic-test-exercise.md

File metadata and controls

18 lines (15 loc) · 1.21 KB

Basic Test

  1. Using prompt ask user below questions and then print these values in console
  • What is your name
  • What is your batch name
  • What is your birth year

Now print name, batch name and age in the console. Let's say if birth year of the user is 1991 then output should be his/her current age 31 years

  1. Print numbers like 3, 6, 9, 12, 15 until the number is less than 100.
  2. Write the differences between truthy and falsy values.
  3. Write the differences between implicit and explicit type conversion.
  4. Ask user a question "Do you want to study Nodejs"? If user click on "OK" button then print "Yes" else print "No" in the console
  5. Take one number. If number is odd and less than 20 then in alert box show "Yes" and else show "No" in alert box.
  6. If rating is 5 then print Excellent. If rating is 4 then print Good. If rating is 3 then print Average. If rating is 2 then print Poor. If rating is 1 then print Very Poor else print Invalid rating
  7. What is the significance of use strict ?
  8. Convert any if else condition to ternary operator.
  9. Check if a number is divisible by 13 or not. If yes then check number is also divisible by 4 or not. If both conditions matches then print "Yes" else print "No".