Category Archives : JavaScript Tutorials

Home  >>  JavaScript Tutorials

Wap to perform right/left rotations on the array

23
Sep,2017

0

<html> <head> <title>CA2 – Push,Pop,Shift,Unshift Functions</title> </head> <body> <script> var temp; var n=prompt(“Enter the number of arrays: “); var a=new Array(); for(i=0;i<n;i++) { a[i]=prompt(“Enter “+(i+1)+” value: “); } document.write(“Your Element are: <br> “+a); <!–left rotation using simple loops—> var r=prompt(“<br>Enter…

Wap to print table of each digit as input given by user

23
Sep,2017

0

<html> <head> <title>Javascript Tutorials</title> </head> <body> <script type=”text/javascript”> function show2() { var m=prompt(“Enter the number: “); while(m>0) { var rem=parseInt(m%10) document.write(“Table of “+rem + “<br>”); for(i=1;i<=10;i++) { document.write(rem +” * “+i+ ” = “+ (rem*i) + “<br>”); if(i==10) { document.write(“<br><br>”)…

JavaScript Basic Programs

23
Sep,2017

0

Basic Programs of JavaScript ——————————————-Javascript Tutorials———————————————- <script type=”text/javascript”> function show() { return “xyz”; }