What is Javascript?
Javascript is a programming language that is primarily used in web browsers.
In the past Javascript was available in a limited basis for web servers. More recently via NodeJS Javascript has become available on any computer without the need for a web browser. What you learn in this course is the starting point for using Javascript in NodeJS.
What are the uses of Javacript in web browsers?
-
Create, change, copy, clone and delete HTML elements.
-
Change HTML attributes.
-
Change HTML CSS Styles.
-
Validate data.
-
Assist in sending and receiving data from a web server.
Javascript Is Not Java.
Javascript and Java are two different programming languages. Now you will find that all programming languages share some common features and syntaxes. In this case the names share the word Java. Javascript is processed by the web browser. Java can run in a web browser but requires an up to date web browser plugin to work. Java has limited access to the web browser and web page. Javascript has full access to the web browser and web page. Javascript source code is visible in the web browser. Java is not. Java had a lot of potential for web pages when a plugin was first created. However Java required a more experienced software engineer making programming more expensive, created large files to download and was subject to plugin updates are reasons it did not gain popularity.
Source files to central processing unit
All programming languages have a source file which is a text file like your HTML or CSS files. That source file needs to be converted to machine language, which is the language for your computer processor. For Javascript the source file is read by the web browser and is converted on demand. This entails many steps between the source file and what happens in the inner workings of a computer processor. This is runtime processing that is slow and could result in performance degradation that can be apparent to the users. Programmers writing large programs are always concerned with performance. This is more an issue with large Javascript programs.
Languages like Java, the source file is first read by a compiler program that removes many of the steps between the source file and the computer. At run time more of the work is already done for the instructions to be moved on the computer processor, so it can be faster.
Javascript History
Javascript was called Mocha and then in September of 1995 it was changed to LiveScript. Two months later the name was changed to Javascript. The W3C publishes a short interesting history.