Posts

Showing posts from August, 2020

java script some basic start

comment  - // multiline comment   -    /* kd  write any number of line */ variables var number1 = 12; var number2 = 34; console.log(number1+number2); objects// var marks = {        ravi = 26,        raju = 34,       vijay = 65 } Booleans  var a = true; var b = false; . Two types of data type in javascript  1- primitive data type: undefined, null, number,string,boolean,symbol 2- reference data type: Arrays and Object  write array : var arr = [1,2,3,4,5] /// check on console - console.log(arr[2]);  or console.log(arr); // operator in javascript  Athematic operator  var a = 100 var b = 10 console.log("The value of a+b is  ", a+b); // Assigment Operators    var c = b;   c += 2;   console.log(c)  //comparision operatos   var x = 10   var y = 20   console.log(x==y)   console.log(x>=y)   console.log(x<=y) // logical operator    console.log(true && true);    console.log(false && false);  // logical or operator    console.log(true || false);    console.log(false

Java Script starting file

Image
<!DOCTYPE html> <html lang="en" dir="ltr">   <head>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Javascript</title>   </head>   <body> <h1>Welcome to ritesh javascript tutorial </h1> <div class="container"> <button id="click">click me </button>         </div>      <script>      </script>   </body>    </html> or where you can add script source  <!DOCTYPE html> <html lang="en" dir="ltr">   <head>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Javascript</title>   </head>   <body> <h1>Welcome to ritesh javascript tutorial </h1> <div class="cont