Posts

Showing posts from April, 2019

java script (variables)

Hello friends Welcome to next blog about to java script.. In this blog we discuss about java operators. first we learn how to assign value to variables.use "=" for assign values           var  x =  5 ;                    var  y =  2 ;  Add operation use this operation to add values.           y=x+z multiplication  operator ( * ) use this for multiplies numbers       z=x*y Divide operator( / ) use this for divide numbers      z=x/y Some other operations    " - " => Subtraction  " ** " => Exponentiation   " % " => Modulus   "++" => Increment  "--" => Decrements Assignment Operators    =, +=, -=, *=, /=, %=, **= + operator also use to add (concatenate) strings var  txt1 =  "saman" ; var  txt2 =  "perera" ; var  txt3 = txt1 +  " "  + txt2; Comparison Operators == => equal to === => equal value and typ

Java Script (Key words)

Hi friends  welcome to second block about java script. Java script key words Pause Terminate a switch or loop Carry on Jump a loop and start at the top debugger Stop JavaScript execution and call (if available) the debug function to do while Execute an instruction block and repeat it as long as a condition is true for Mark a block of statements to execute, as long as a condition is true a function Declare a function if not Mark a block of statements to execute, depending on a condition return Leave a function switch Mark a block of instructions to execute, as appropriate. try ... catch Implements error handling in an instruction block var Declare a variable Java script is case sensitive language . as a example var Var, VAR are different words . cant use Var to declare variable . Comment in js single line comment start with "//" mark Multi-line comment write in between  /*  */ marks. See you in next Blog. Thank You

Basics OF JavaScript

What is JavaScript..? object-oriented programming language commonly used to create interactive effects in web browsers. JavaScript engines are now integrated with many other types of host software, including server-side databases and Web servers, as well as non-Web programs such as word processing and PDF. only in run time environments making JavaScript available for writing on desktops and mobile applications, including desktop widgets. Lets start Learn Java script... In HTML java script type in between <script> tags. < script > document. getElementById ( "demo" ). innerHTML  =  "Test Java Script" ; < /script > I n this script tag  can write in in between <head> tag or <body> tag Script tag can placed in external files function  f() {  document. getElementById ( "demo" ). innerHTML  =  "Test funtion." ; } can call external js file like this < script  src ="script.js&qu