Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

Features of Java Script


Features of Java Script scripting language explained:

Simple and Easy: JavaScript is a simple and easy to learn programming language.
JavaScript programs / scripts contain English like commands / instructions, hence easy to learn, code, understand, modify, debug and test. JavaScript is a simplified version of Java programming language.

Powerful: JavaScript is a powerful and popular language.
JavaScript provides rich set of operators to perform operations on various types of data.JavaScript provides rich set of control statements to control the flow of execution of the code, JavaScript provides array construct to create list, tables and perform various operations like searching, sorting, merging etc. on them. JavaScript provides various built in objects. They can be reused to get solutions to many tasks quickly.

Light weight:
JavaScript codes take very less memory footprint for execution. And JavaScript is a simple and small language. Hence JavaScript is considered as light weight language.

Scripting language:
Codes that are placed within another document for execution are generally called as scripts. Scripts depend on another file for their execution. As JavaScript codes are placed within HTML documents for execution. We can say JavaScript codes are called as scripts not programs.

Scripting languages are designed to extend capabilities or add behaviors to already built applications. As JavaScript is used to add behaviors to HTML elements, we can say JavaScript is a scripting language.

Client side scripting language:
JavaScript codes are not executed on the server instead they are executed on client machine by user’s browsers (AKA Client soft-wares / browsers). As JavaScript codes are executed on client side not on the server side, we can say JavaScript is a client side scripting language.

Interpreted language:
Most of other programming language codes need to be compiled first for their execution. JavaScript codes need not be compiled; because browser interprets and executes JavaScript codes line by line on the fly. Hence JavaScript is an Interpreted language.

But, modern JavaScript code is compiled to an intermediate byte code and then interpreted and executed by JavaScript Engine available in modern browsers.
Hence we can say modern JavaScript is compiled as well as interpreted language.

Prototype or object based:
In object oriented programming languages, objects are created by creating new instances of classes whereas JavaScript is a prototype based language. Hence in JavaScript objects are created by creating new instances of prototypes instead of classes.

As JavaScript is an object based language, it has no object oriented concepts like class, inheritance, polymorphism, dynamic binding etc. Object oriented concepts are simulated through the use of prototypes in JavaScript.

Case sensitive:
JavaScript treats lower case letter and upper case letters separately / differently. If we create three identifiers num, NUM, and Num, then they are considered as three different identifiers. Because they might have same spelling but they are defined differently using upper case and lower case letters. In JavaScript lower case letter ‘a’ and upper case letter ‘A’ are completely different.
While programming in JavaScript anything need to be written in lower case letters, must and should be written in lower case letters and anything need to be written in upper case letters, must and should be written in upper case letters. JavaScript is case sensitive. HTML is not case sensitive language.

Weakly or un-typed language:
In JavaScript while creating variables, constants or parameters programmers need not to explicitly define their data type. JavaScript automatically figures out the data type based on the type of value stored in a variable, constant or parameter.
Languages in which data type needs to be explicitly defined are known as strictly typed or strongly typed language.

Browser Independent:
To execute JavaScript code browsers need not to install any extra plug-in. Today almost all browsers have built in JavaScript engine. To execute JavaScript codes, user just needs to enable it in browser settings. “Enable JavaScript”.

Not fully secure or safe:
As JavaScript codes get download on client machine and then get executed. Sometimes other malicious or harmful codes can also get download with them. Hence JavaScript is not fully secure language.

Interview Questions: