Post hidden from Hashnode
Posts can be hidden from Hashnode network for various reasons. Contact the moderators for more details.
The Ten Interview Questions On Javascript That Only A Handful Javascript Programmer Know.
You have taken or given many interviews on Javascript, some are simple and some are hard to answers. Here in this article, I am going to list 10 Interview Questions On Javascript That Only A Handful Javascript Programmer Know.
1. How can the operating system of the client machine be detected?
We can get the operating system of the client machine using the navigator object. Below are some sample methods of navigator object. navigator.appName, navigator.appCodeName, navigator.platform
2. Explain Scope In JavaScript?
Scope in Javascript refers to accessibility of functions and variables. In JS there are two types of scopes are available Local Scope, Global Scope
3. How JavaScript is related With ECMA Script?
ECMAScript is another technical name for JavaScript as it is also known as LiveScript. The current JavaScript that you may see running in browsers is ECMAScript revision 6.
4. Explain HOISTING in Javascript?
Hoisting is one of the features of javascript through which function and variable get lifted up (hoisted) to the current scope. it allows the developer to use function and variable before its declaration. There is two way of creating the function in javascript. Function Declaration,bFunction expression
5. Explain named function in JavaScript?
Named functions in javascript is a function that must have a name at the time of defining a function. Below is an example of named functions.
function foo(){
console.log("I am a named function");
}
foo();
6. Is an anonymous function can be assigned to a variable?
Yes, we can assign an anonymous function in a variable.
var a= function(){
console.log("I am an anonymous function");
}
7. How to create a three-dimensional array in Javascript
Creating a three-dimensional array in Javascript
var 3DArray=[[[]]]
8. Explain negative infinity?
Negative Infinity is a number in JavaScript which is occurred when we divide a negative number with 0
var num=-10;
function testInfinity()
{
console.log(num/0) // outputs -Infinity
}
testInfinity();
9. List types of pop-up boxes available in JavaScript?
There are basically 3 types of popups available in JavaScript. They are Alert Box Confirm Box Prompt Box
10. List some JavaScript unit testing tools?
Buster.js, YUI Yeti, Jasmine, and Karma are few javascript unit testing tools.
Thanks for Reading. If you think these questions are meaningful then please like and share. Suggestions are corrections are welcomed.
Also If you looking for more interview questions on Javascript . Please visit onlineinterviewquestions.com a complete website for Technical Interview Preparation