Javascript - Functions
/20
0
:
0
Submit
Total 20 question (100 marks)
1. What is the result when the call function below? function getCount(a){ var b = a + 1; function calc(c){
2. What is isNaN() function in Javascript?
3. What is function help get an element Html by id attribute?
4. What is the output of this program? function main() { try { f77(); } catch(e) { console.log(e); }; try
5. What is the result of the block js code below? function getSum() { var a = 7;
6. Select the right options about function in Javascript
7. What is the result of the block code below? var human = (function () { var publicAPIs = {};
8. What is function help execute command javascript in plain text?
9. How to call a function has the name "getFullName()"? Select the right answer.
10. Which is the correct syntax to create a function in Javascript?
11. What is the output of this program? var a23 = 1; function b24(){ a23 = 10; return; function a23() {
12. What function help convert a string to a number?
13. What is the result of the block code below? function first() { window.age = 15; } function second() {
14. What is the output of this program? var fn22 = 1; function gn22() { if(!fn22) { var fn22
15. What is the result of the block code below? function getNumber(x){ delete x; return x; } var result = getNumber(1); alert(result);
16. What is the result of the below function: function test() { if(true) { var a
17. What does the bellow function do? function doSomething(val) { return val ? 1 : 2; }
18. What is the return value of bellow code? function square (x) { return(x * x) }; function cube (x) { return(x
19. What is the output of this program? var y = (function (x){ var x= 1 + x; return x;
20. What is the return value of bellow code? var num = 23; function evil () { num += 5; } evil(); console.log(num);
Next
Previous