Top JavaScript Interview Questions & Answers
JavaScript Interview Questions
JavaScript Interview Questions
1. What is JavaScript?
JavaScript is a client-side,lightweight,interpreted as well as server side scripting language that allows you to make web pages interactive.JavaScript is also an Object based Programming language.JavaScript is used in both Back End and Front End Development.2. What are JavaScript Data Types?
- String
- Number
- Boolean
- Object
- Undefined
- Symbol
3. How many types of comments are there in JavaScript?
There are two types of comments in JavaScript:1- single-line comments (//)
2- multi-line comments (/* */)
4. Explain the difference between "==" and "==="?
"==" checks only for equality in value whereas "===" is a stricter equality test and returns false if either the value or the type of the two variables are different.5. What is the difference between JavaScript and Jscript?
Both are almost similar. JavaScript is developed by Netscape and Jscript was developed by Microsoft .6. In how many ways a JavaScript code can be involved in an HTML ?
There are 3 ways in which a JavaScript code can be involved in an HTML:- Inline
- Internal
- External
7. Which company developed JavaScript?
Netscape is the software company who developed JavaScript.8. How to defined an anonymous function?
An anonymous function can be defined in a similar way as a normal function but it would not have any name.9. What is 'this' keyword in JavaScript?
'This' keyword refers to the object from where it was called.This has different values depending on where it is used. In amethod, this refers to the owner object and in a function, this refers to the global object.
10. What are the advantages of JavaScript?
Advantages of JavaScript are as followed:
- Less server interaction.
- Richer Interface
- Increased interactivity.
- Immediate feedback to the visitors.
11. Is JavaScript case-sensitive?
Yes, JavaScript is a case-sensitive language. This means that "Let a" not equal to "let A".
12. What is the use of isNaN function?
IsNan function is use to check the date type. It returns true if the argument is not a number otherwise it is false.
13. What are the features of JavaScript?
- JavaScript is a lightweight, interpreted programming language
- It is complementary to and integrated with Java.
- JavaScript is complementary to and integrated with HTML.
- JavaScript is open and cross-platform.
14. Is JavaScript front end or backend?
JavaScript is used in both Back End using Node.js and Front End Development. JavaScript is used across the web development stack. That's right: it's both front end and backend.
1 Comments
Jeel
ReplyDelete