Introduction to JavaScript

Hello Readers!!

In this blog you will be learning about JavaScript this is for Beginners.

Have you ever thought that how this websites work !!?? How does it interact with you? I'll be answering these questions later in this blog. So let's get to the point !! As you know already there are many web technologies like HTML,CSS to create web pages but if u want client side scripting you need JavaScript. You might be wondering now that what is client side scripting!?

client side scripting is a logic or source code that is executed on the client's browser. It allows you to create responsive web pages. for example : Let's assume you have a form to be filled and you have a button in that form as shown below Screenshot (57).png

Once you click on submit button that details has to get stored on back end. such kind of functionalities has to be provided . This can be done using JavaScript. So now you have got some idea about it. What is JavaScript??

  • JavaScript is a client side scripting language.
  • It is a high level language. i.e.., it is user understandable
  • It is a interpreted language which means when you run JS program it doesn't create any intermediate files like C, C++,etc... it directly gets translated in machine code.
  • It has object oriented capabilities i.e., It has concept of objects.

What JavaScript can do?

  • It can be executed not only on client side but also on server side i.e.., we will be using nodeJS as back end
  • It is used to perform wide variety of tasks like mobile app development.

JavaScript is safe language because it doesn't provide low level or memory level access.

  • JavaScript reacts to event like request from user ,response from server
  • we can get and set cookies
  • Remember the data on client side i.e., It can save information on local storage and you are not required to give information again when you enter same website.

JavaScript can be run on any operating system. but it cannot run on its own. The browser is responsible for running JavaScript code. The browser has an embedded engine called as JavaScript Virtual Machine.

How does this engine works?

There is a parser in every engine when you run JavaScript code the parser will parse the code i.e., it checks your code line by line if there is any syntactical error in your code it throws an error otherwise, it produces a data structure i.e., Abstract Syntax tree(AST) and it translates into machine code then it will run.

Screenshot (58).png

Different engines have different names example:

  • V8 in chrome and opera
  • Spider Monkey in Firefox
  • Chakra for Internet Explorer
  • Squirrel Fish for Safari

Hope now you have some idea about JavaScript.

Happy Learning!!!

Thank You!