Considering the following snap of code, what is the expected result?
let dogName = 'Tom';
let catName = 'Jerry';
[dogName, catName] = [catName, dogName];
console.log(`Dog name: ${dogName}`);
- String output:
Dog name: Jerry
Free Online MCQ Practice Tests in English
Considering the following snap of code, what is the expected result?
let dogName = 'Tom';
let catName = 'Jerry';
[dogName, catName] = [catName, dogName];
console.log(`Dog name: ${dogName}`);
Dog name: JerryWhen used as a constructor, like new MyFunction(), the value of this will be a brand new object provided by the JavaScript runtime. If we don’t explicitly return anything from that function, this will be considered its return value.
Apply or call method can be used to override the value of this?
What does the below line do considering it as the first line in your javascript file:
(function(){
alert(this);
})();
Pi Day is celebrated on which date?
Who was the first man to walk on the moon?
The term “Partition of India” created which of the two independent dominions?
When multiplied by itself, which number is equal to 12,345,678,987,654,321?
What is the analogy of VACCINE : PREVENT?
Now-a-days many villages are lit ____ electricity.
I am entitled ____ a share of profit. The correct preposition is?
Which is the correct sentence?
If I had known you were coming, …?
A person whose ‘head’ is in the ‘clouds’ is –
No article is used before —
A person who treats mental illness is called —
The Antonym of “Honorary ” is —
Which is the correct sentence?
The speaker failed to make the audience – to him patiently.Which of the following is the correct verb form in the blank above?
What kind of verb is the word ‘Went’ in the sentence: “The dog went mad:?