Friday, 4 December 2015

Java Script Technical Interview Questions

Technical Questionnaire
**Answer the following questions in one line***

1.     Define JavaScript? What is the purpose of using JavaScript?

Answer: JavaScript is an interpreted programming or script language from Netscape. JavaScript is one of the light weights, most simple, versatile and effective languages used to extend functionality in websites.

2.     What is the difference between JavaScript and Java?
Answer: Java is an OOP programming language while Java Script is an OOP scripting language.

3.     Difference b/w HTML4 and HTML5 and its features.
Answer: The syntax in HTML5 is extremely clear and simple as compared to HTML4. One example of this is the DOCTYPE element. In HTML4 the DOCTYPE declaration was too messy and lengthy and used to refer an external source.

4.     What is a Form? When you need a form in an HTML page?
Answer: The <form> tag is used to create an HTML form for user input.
When we creating form element like <input>, <textarea>, <button>, <select> and many more.

5.     What are all the looping structures in JavaScript?
Answer: Loops offer a quick and easy way to do something repeatedly. This chapter of the JavaScript Guide introduces the different iteration statements available to JavaScript.

6.     What are the Data types used in JavaScript?

Answer: JavaScript variables can hold many data types: numbers, strings, arrays, objects and more.
7.     What are the Boolean operators supported by JavaScript?

Answer: Comparison and Logical operators are used to test for true or false.
8.     What is the difference between “==” and “===” operators?

Answer: Difference between the two is that '==' should be used to check if the values of the two operands are equal or not. On the other hand, '===' checks the values as well as the type of operands.

9.     Difference b/w HTML elements and tags.
Answer: An element in HTML represents some kind of structure and Tags are used to mark up the start and end of an HTML element.

10.         Why do we include CSS and JavaScript in body?
Answer: To include your JavaScript files within the head element, and up to now, as far as you know, it has worked just fine for you.

11.         What are all the types of Pop up boxes available in JavaScript?
Answer: There are three types of Pop up boxes available in JavaScript –
-Alert Dialog Box
-Confirmation Dialog Box
-Prompt Dialog Box

12.         What is DTD?
Answer: A DTD defines the structure and the legal elements and attributes of an XML document.

13.         List out the types of CSS? Explain their purpose in detail?
Answer: Types of CSS - Inline, Internal & External
An internal style sheet holds the CSS code for the webpage in the head section of the particular file. The External Style sheet is a .css file that you link your website to and the Inline style is specific to the tag itself. The inline style uses the HTML "style" attribute to style a specific tag.

14.         Difference b/w DIV and SPAN.  Explain is it possible to put a DIV within SPAN.
Answer: While a span allows you to separate things from the other elements around them on a page or within a document, it does not cause a line break. This is why it is perfect for in-line styling, like coloring a single word in a sentence to draw more attention to it.

But a div, by default, creates a line break because it is used to make separate containers or boxes within a page or document, hence the name division. So the proper way to use a div is as a containing element, rather than an inline styling element.
Yes - it possible to put a DIV within SPAN.

15.         What kind of conditional statements does JavaScript support?
Answer: Conditional statements are used to perform different actions   based on different conditions.

16.         By using which statements we can handle errors in JavaScript.
Answer: try...catch...finally Statement

17.         Difference b/w HTML elements and tags.
Answer: Elements give structure to a HTML document and tells the browser how you want your website to be presented. Generally an element consists of a start tag, some content, and an end tag.

18.         How do you declare variables in JavaScript?
Answer: JavaScript variables are containers for storing data values.
var x = 5;
var y = 6;
var z = x + y;

19.         What are global variables? How are they declared? What are the problems with using global

Answer: A global variable has global scope: All scripts and functions on a web page can access it.
var carName = " Volvo";

// code here can use carName

function myFunction() {

    // code here can use carName

Global variables are in danger of being overridden by your own code as your code base grows, or by any framework or plugin you may use. This can easily introduce bugs that are hard to track down.

20.         What is DFP and DFA?
Answer: DFA is for delivering ads to be shown on other websites and networks. DFP is for showing ads on your web site, like AdSense but with more control.

21.         What is Google revenue model?
Answer: Google uses three methods to partner with merchants and advertisers: Google Checkout, Google AdWords and Google AdSense.

22.         What are the online advertising tools used in Google?
Answer: AdWords, YouTube, Adsence, Google Analytics and many more.

23.         If the advertisements are left without clicked will they be able to make money out of it?
Answer: No


  1. very good collection of question and answers thank you for sharing this article with us. know more about Digital Marketing Course

  2. Very nice post great work by the admin thank you for sharing. Digital Marketing Course Online


The New Era of Digital Marketing, Get Close Insights for Your Offerings!!!

The business today requires digitized trade and communication to grow and lead the current market of digital era. Starting for the SMB...