JavaScript Tutorial

JavaScript first class

Introduction to JavaScript

JavaScript is a dynamic computer Programming language. It is a lightwight an most commonly used as a part of web pages. The program in this language is called script.It can be written within a html file and run autometically as the page loads. JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine. Javascript can be used for both backend and frontend development such as ReactJs can be used for frontend development and Nodejs can be used for backend development.

1. Lecture first

  • First program of JavaScript
  • JavaScript code Should be written inside script tag
  • It's case sensitive and always needs a Semicolon
  • JavaScript is a case sesitive laguage and it requires semicolon to end each statement.

  • JavaScript is a dynamic language
  • JavaScript is called a dynamic language because it doesn't just have a few dynamic aspects, pretty much everything is dynamic. All variables are dynamic (both in type and existance), and even the code is dynamic. You can create new variables at runtime, and the type of variables is determined at runtime. You can create new functions at any time, or replace existing functions. When used in a browser, code is added when more script files are loaded, and you can load more files any time you like.

  • JavaScript is not statically types
  • It means we do not need to specify the type of data while creating variables. for ex:

  • Datatypes are inferred
  • Javascript infer variable types at run time.This means once your code is run the compiler will see your variable and its value then decide what type it is.

Comments