Time Left : 00 : 30 : 00
Which of the following is not a reserved word in JavaScript?
Correct Answer : C
Which built-in method sorts the elements of an array?
Correct Answer : C
In JavaScript, what is a block of statement?
Correct Answer : B
What will be the output of the following JavaScript code?
function printArray(a) { var len = a.length, i = 0; if (len == 0) console.log("Empty Array"); else { do { console.log(a[i]); } while (++i < len); } } printArray([ 1, 2, 3, 4, 5 ]);
Correct Answer : A
Predict the output of the following JavaScript code.
var a="javascript"; var x=a.lastIndexOf("a"); document.write(x);
Correct Answer : A
Which answer represents the following order of TYPES? Object, String, Boolean, Number
Correct Answer : C
Which one of the following keywords is used for defining the function in the JavaScript?
Correct Answer : D
Which property is object oriented?
Correct Answer : C
Which of the following function of String object causes a string to be displayed in a small font, as if it were in a <small> tag?
Correct Answer : B
Which of these is proper a JSON array?
Correct Answer : D
Which of these is a benefit JSON has over XML?
Correct Answer : B
What event do you use to perform something after the page has finished loading?
Correct Answer : B
Which of the algorithmic languages is not lexical scoping standardized in?
Correct Answer : D
What keywords are reserved in JSON and cannot be used as keys?
Correct Answer : C
To know about an object, whether the object is a prototype (or a part of a prototype chain) of another object, the user can use_______
Correct Answer : D
In JavaScript, what kind of scoping is used?
Correct Answer : D
The "function" and " var" are known as:
Correct Answer : C
What will be the function of the following JavaScript code?
var scope = "global scope"; function checkscope() { var scope = "local scope"; function f() { return scope; } return f; }
Correct Answer : C
What will be the output of the following code snippet?
let s = "00000001111111"; let l = 0, r = s.length - 1, ans = -1; while(l <= r) { var mid = Math.floor((l + r) / 2); if(s[mid] == '1') { ans = mid; r = mid - 1; } else { l = mid + 1; } } console.log(ans);
Correct Answer : B
Can be redeclare a variable that is declared with let keyword?
Correct Answer : B
A disadvantage of JSON is that it requires the use of JavaScript.
Correct Answer : A
What is the purpose of the dynamic scoping?
Correct Answer : A
What happens if the return statement has no related expression?
Correct Answer : A
The statement a===b refers to
Correct Answer : C
What happens when we run this code?
function dog() { print("I am a dog."); } dog.sound = "Bark";
Correct Answer : D
What will be the output of the following code snippet?
var a = "hello"; var sum = 0; for(var i = 0; i < a.length; i++) { sum += (a[i] + 'a'); } console.log(sum);
Correct Answer : A
Which function is used to serialize an object into a JSON string in Javascript?
Correct Answer : A
Which is the correct syntax to access an object property in JavaScript?
Correct Answer : D
Each tab in the single web browser window is called as ____________
Correct Answer : A
What will be the output of the following JavaScript code?
try{ const cars = { company: 'Honda' }; Object.seal(cars); delete cars.company; document.write(cars.company); } catch (err){ document.write(err.message); }
Correct Answer : B