1. What is JavaScript?

JavaScript is the scripting language preliminary used on the web. It is client-side as well as server-side programming language. It generally enhances HTML pages and commonly found in embedded in HTML code. JavaScript is an Object Oriented Programming language as well as interpreted language. Hire freelancers online for JavaScript Programming through trusted freelancing websites.

  1. What are JavaScript data types?

Mainly there are two types of data types

Primitive Data type

Non-Primitive Data type

Primitive Data type

  1. String
  2. Number

III.    Boolean

  1. Undefined
  2. Null

Non-Primitive data types

  1. Object
  2. Array

III.    RegExp

  1. What is this keyword in JavaScript?

The keyword “this” work differently in JavaScript as compared to another language. It has some difference between strict mode and non-strict mode. In many cases, the value of “this” is determined how function gets a call.

  1. What can JavaScript program do?

Generation of HTML pages without accessing the web server. The user gives the control over the browser like user input validation simple computation performs on the client machine.

  1. What is the difference between classical inheritance and prototypical inheritance?

Classical Inheritance: – JavaScript is a class based object oriented programming language. A class is a blueprint for every future object. In this case, if you change the class after initiate your object the previously created object has not the changes. Freelance jobs online for this sector are available in plenty due to extensive usage.

For ex: – suppose you create a class of teacher and you want to create another class that is a student that inherit from a teacher. The class student gets inherited from the teacher class. This type of inheritance is very useful in complex programming structure.

Prototype Inheritance: – Prototype-based language like JavaScript does not follow templating type of structure. If you create an object and give reference to another object, then functionality you put in your prototyping is share by reference object

  1. How JavaScript is different from Java?

Java is a product of Sun Microsystems whereas JavaScript is by Brendan Eich of Netscape. Java creates application that runs on virtual machine and browser whereas JavaScript run on browser only. Java code gets compiled whereas JavaScript code gets interpreted. Object of Java is class based whereas JavaScript is prototype based. Java is high level; static compiled and strongly type language whereas JavaScript is text based dynamic and weakly type language.

  1. What are different types of error in JavaScript?

Syntax Error: – Syntax Errors are those errors which occur when you break the rules defined in JavaScript while creating a program. This error occurs while loading a web page.

Runtime Error: – Runtime error informs the programmer that there is a problem with a script while loading. You can see runtime errors in a browser. It specifies the line number in the alert box so that you can easily search that error in Script. Due to the use of improper command the runtime error occurs.

Logical Error: – Logical Error is the type e of error in which you don’t get an expected result as required. This error is also known as a bug.

  1. What is difference between alert box () and confirmation box ()?

Alert box (): – In an alert box you have to display only one button that is OK.

Confirmation box (): – In confirmation box, you have to decide two things that are Ok and Cancel according to a condition.  Hire freelancers online for JavaScript Programming, who are generally available as Front-end developers.

  1. What are types of Comment in JavaScript?

Comment is used in the coding for understanding the code. Using Comment the code is more readable by anyone.

Single Line Comment: – If you want to comment single statement in the code that time single line comment is used.  It is denoted as // at the start of a line in the code, and that line is neglected by JavaScript.

Multiline Comment: – If you want to comment more than one statement in code that time a multiline comment is used. A multiline comment starts with /* and end with*/ and code blocked between this is neglected from JavaScript.

  1. What is JavaScript Anonymous Functions?

Functions that are dynamically declared at runtime are known as Anonymous Function. It is known as anonymous because they don’t give name in the same way as they declared in normal function. Anonymous function declares using the function operator instead of the function declaration. You don’t need to explicitly define the function before passing it as a parameter to the other function.

Var anon = function ()


Alert (“I am anonymous”);


anon ();

  1. Explain exception handling in JavaScript?

Exception handling the new features added in JavaScript like other programming language. JavaScript implement the try block, catch block, and finally block as well as throw operator to handle the exception. Try block always used before the catch block. In try block programmer provide your code to be executed. If there is no error in the code the catch block is not executed but finally block always executed.

Syntax of Exceptional handling

try {

// attempt to execute this code

} catch (exception) {

//this code handle exceptions

} finally {

// this code always get executed


  1. Explain Continue statement in JavaScript?

The continue statement terminates the execution of the statements in the current iteration of labelled a loop. It does not exit the loop it executes the condition for the next iteration of the loop. The statement after the continue statement gets executed.


Continue [label]

  1. Explain Break statement in JavaScript?

The “Break” Statement allows you to exit the loop. The “Break” statement always introduce with the Switch statement. When break a statement is used inside the loop the statement stopped the execution and exited immediately from a loop.

  1. Explain the cookies in JavaScript?

Web Server and web browser use HTTP protocol to communicate. Cookies are common in commercial website which is requiring for maintaining the session information among the pages. In most of the situation cookies is the most efficient method and tracking preferences, purchases, commissions and other information required for better visitor experience. Freelance jobs online are available in this sector for a long time now.

  1. Explain Array in JavaScript?

The Array object lets store multiple values in a single Variable. It can hold a fixed-size sequential collection of elements of the same type. An array is the collection of similar type of data type. The array can have a string, a number or an object in a single slot.

Ex: – var flowers = new Array (“Rose”, “Lilly”, “Lotus”);

Kitty Gupta