JS is the abbreviation for JavaScript. Humans, animals, and birds have their way of communicating. In the same manner, to work with webpages we need to use the languages understood by the computer. A programming language is a means to give instructions to get the required display. JavaScript is one such programming language used in making a webpage. Most of the non-browsers make use of JavaScript. Even if the language is mostly known for web browsers, it is also used in non-browser environments. The language is lightweight, cross-platform, and interpreted language used for scripting.
JavaScript is a language that is a loosely typed programming language. It is a multiplatform language that needs no use of a compiler to execute. The language is well-known in developing web pages. The language is used for both Client-Side and Server-Side development.
Brendan Eich invented JavaScript in 1995. The purpose behind its development was Netscape 2. Then the language was handed to ECMA. The original name of JavaScript was LiveScript.
Java | JavaScript |
Java has a strong set of rules that needs to be followed. The variables need to be declared first for it to work | JavaScript is less strict than Java. It is loosely composed. |
Java is an object-oriented programming language. | JavaScript is an object based scripting language |
Java is a standalone language and needs a compiler to run. | JavaScript needs the support of HTML. It is executed using browsers |
The two ways to add JavaScript in HTML are internal JS and external JS. For internal JS <script> tag is used in the HTML file. For external JS we link the file that consists of the code in the tag <head>.
The language is called lightweight because it makes minimal use of the CPU.
The name used for JavaScript was Mocha. Then it was converted to LiveScript.
Arrays are storage units. They help to store multiple values.
When one needs to perform the same task repeatedly, loops can be used instead of repeating the code.