Javascript in Random level
/20
0
:
0
Submit
Total 20 question (100 marks)
1. What is the mean of += operator in the below code? var fullname = "Jonh"; fullname += " Hug"; alert(fullname);
2. What function help convert a string to a number?
3. What loop bellow is the correct syntax?
4. What is the result of "variable"? var variable; if (""){ variable = true; } else { variable = 55; }
5. How to declare a variable in javascript?
6. What is the correct syntax to comments one line code in JavaScript?
7. What is the return value of bellow code? var num = 23; function evil () { num += 5; } evil(); console.log(num);
8. What is the result of the below code? while (i < 5) { i++; if (i == 3) {
9. Where does the HTML page allow you to write javascript?
10. What is different between let and var in Javascript?
11. How to insert a multi-line comment in JavaScript?
12. What is the output of this program? var a23 = 1; function b24(){ a23 = 10; return; function a23() {
13. What is the output of this program? function main() { try { f77(); } catch(e) { console.log(e); }; try
14. Which company has developed Javascript?
15. What is the difference between == and === compare operators in Javascript?
16. What is the output of the IF/ELSE command bellow? if (5 > 10) { console.log("Not so sure about this"); } else
17. How to assign value to the myName variable but still keep old value? Select the right answer.
18. Select the right options about function in Javascript
19. Select the correct IF condition below of Javascript.
20. How to check the age variable is a number or not? var age ="12abc";
Next
Previous