JavaScript MCQ Questions
1.What is JavaScript?
JavaScript is a scripting language, which can be used on client on server side.
2. JavaScript is single-threaded
JavaScript is single-threaded.
3. JavaScript has asynchronous execution model
JavaScript is single threaded and has a synchronous execution model.
4. Can JavaScript be used for backend development?
JavaScript can be used for backend development using Node.js.
5. How can a datatype be declared to be constant in JavaScript?
The const keyword is used to declare a variable as a constant type in Javascript, e.g.:
const pieValue=3.14
6. What will be output of following statement?
let a='3';
console.log(a+3);
As you have a string datatype first, any variable that comes after the “+” operator it will be concatenated to your data, i.e "33".
7. Correct way to declare variable?
We can declare a variable using var or let or const, etc.
8. Is Javascript case sensitive?
All JavaScript identifiers are case sensitive. e.g. fistName and firstname both are different variables.
9. What will be output of following statement?
var val1='JavaScript';
var val1='JSDevLife';
console.log(val1);
If we use var then we can redeclare it, and it will take last updated value so it prints JSDevLife.
9. What will be output of following statement?
let val1='JavaScript';
let val1='JSDevLife';
console.log(val1);
Variables defined with let cannot be redeclared.
That was such a truthful explanation. You very beautifully explain the concepts, and I completely relate to them. When I think about to hired flutter app developers, the name Eiliana.com strikes first in my mind because I recently hired a few experts, and I am impressed with how they treated their customers.
ReplyDelete