Tuesday, 12 November 2019

Introduction to Javascript


JavaScript is a high level interpreted scripting language. Here high level is defined by a programming language that have English words in it with all computerised words.

The main question many beginners asks, whether Java and JavaScript are same? Because of their names sounds similar most of them thinks both have a great connection. But we should understand that there is no connections between Java and JavaScript. It is architecturally, functionally different. As like car and carpet sounds similar there are no connections and similarities. 

The main role of JavaScript is to make a website alive. HTML is the language that helping us to build the structure and the elements of the web page. And CSS helps us to beautify the elements and design the element.

But Javascript gives some functions like pop up messages, small games, simple animated elements etc.

For most of the languages we should install it compilers and interpreters to run the source code for it. But in Javascript this doesn't needed, because all of our browsers run Javascript.

The extension of JavaScript is JS. The Javascript file will be like “filename.js”.
There were so many frameworks have been created based on Javascript. For example Angular, Vue.js, React.js, Note.js and much more..

The Usage of Javascript.

Web development - Javascript is plays a leading role in both front and back ends. JavaScript based frameworks also in a great way in the web development industry.
Web application – Javascript is a great tool to build web applications too. To run a server based programmes most programmers prefer Javascript.
Server application – Javascript helps us to build and to run a server based application.
And smart watch application, games, presentations, and many more…

Here I like to share 2 sample keywords used in Javascript.

First one is the var keyword, which means variable.
To declare a variable we should type like follows
var (identifier) = (value);
identifier is a name for the variable to call it anywhere,
value is the content of that variable we are going to assign.

The second is comment
All the words in the code will be read by the computer, but here we say the computer ‘Hey this is for me not for you… :)’. Simply a content that only programmers can read, which a machine couldn't read.
To comment something we have to use ‘/’ twice and then we can write our comments.
Var x = 6; //here I have assigned 6 to the x variable

2 comments: