Skip to main content

introduction javascript |0

 

What is Javascript ?

JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages.

in one word : java script is just in time compile programming language.

Why is it called JavaScript?

When JavaScript was created, it initially had another name: “LiveScript”. But Java was very popular at that time, so it was decided that positioning a new language as a “younger brother” of Java would help. But as it evolved, JavaScript became a fully independent language with its own specification called ECMAScript, and now it has no relation to Java at all.

Note : javascript is made by Brendon Eich in 1995 in that time javascript is called mocha before

Javascript Syntax

console.log it is the function in javascript which used to  print any kind of variables defined
before in it or to just print any message that needs to be displayed to the user.

double slash (//)  : double slash is use for single line comment 

variable declere keyword
1. var )----------~   this keyword is the redeclere and changable their value is undefine 
ex :-   var x = 5; var y = 5;

2. let )----------~ this keyword is undeclare but this the updatable and their value is define
ex :-    let x = 5;

3. const )----------~ this keyword undeclere and unupdatble
ex :- const price = 10 


Arithmetic operator
    let x-5;
    let y-9;

Datatypes in javascript

1. primative values 
2. object

#Primative values
primative value are the those immutable data which is at the lowest level of this language
there are 7 primative datatypes 
1. string
2. number
3. bigint
4. boolean
5. null
6. undefined
7. symbol

if else condition in javascript 

here is code for if else explanation 

//if else condition
let status = "roshay";
if (status === "roshay") {
     message = "he is the programmer"
}else {
   message = "welcome to our blog"
}





Comments

Popular posts from this blog

HTML, CSS, JS and how website work

 Basic Requirments to build a website HTML                    Must/Structure/Skalaton CSS                         Design JAVASCRIPT     Logic/Brain How Website Work Client request for the website  server returns the response Role of HTML - HTML stands for Hyper Text Markup Language - it is basically a standard markup language for given a statics skeleton to web application and website - its a well standarized system  ROle of CSS -Cascading Style Sheets which is known as CSS is a style sheet language that use to handle the presenatation of the web pages containing HTML - it makes our websites beautiful and modern looking Role of JS - JavaScript which is known as js, is a highly level dynamic interprated programming language. - it allows client-side scripting to create completely dynamic web application and websites. 

introduction to programming

  introduction to programming. programming is a way to talk to computer a language like nepali, hindi, english and spanish etc. can be used to talk with human but for computer we need strainghtforward instruction programming is the act of constructing a program, a set of precise instruction telling a computer what to do. What is Ecmascript ? Ecmascript is a standard on which javascript is based, it was created to ensure that different documents on javascript or actually talking about the same language.  Javascript & Ecmascript can almost always be used in the interchangly javascript is very literal in what it allows. how to execute Javascript ? there are lot of the way to execute javascript. But we will learn some common way to execute javascript. javascript can be execute right inside one's browesers you can open the javascript it console and start writting javascript there. Another way to execute javascript is a runtime like node.js which can be installed and used to run...

reserved word in js

  Some JavaScript | Reserved Words in javascript reserved word is this word which used javascript already in their program written time  this word not allowed when choosing variable name.  here is some javascript reserved word :  abstract arguments await* boolean break byte case catch char class* cons 1 continue debugger default delete do double else enum* eval export* extends* false final finally float for function goto if implements import* in instanceof int interface let* long native new null package private protected public return short static super* switch synchronized this throw throws transient true try typeof var void volatile while with yield x