News
Entertainment
Science & Technology
Life
Culture & Art
Hobbies
News
Entertainment
Science & Technology
Culture & Art
Hobbies
Free Web development courses with real-time projects Start Now!! Program 1 // Variables arguments in funcion function displaysort(...args) { let i,j,temp for(i=0;i<args.length;i++) { for(j=i+1;j<args.length;j++) { if(args[j]<args[i]) { temp=args[i] args[i]=args[j] args[j]=temp } } } console.log("Sorted...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <script language="JavaScript"> function display() { //alert("Wel come in java Script event code") // //document.writeln("Wel come in java Script event code") // document.writeln("<marquee...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <head><title>Event Code</title> <script language="JavaScript"> function display() { alert("Welcome in data flair free course") } function displayImage() { document.writeln("<img src=dog.jpg>") } </script> </head>...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <head> <script> // let empname1=Symbol("Vishal") //unqiue // console.log(typeof empname1) // document.writeln(empname1.toString()) // alert(empname1.toString()) // alert(empname1.description) // document.writeln(empname1.description) // let empname2=Symbol("Vishal") //unique //...
Free Web development courses with real-time projects Start Now!! Program 1 class Employee { constructor(eid=101,ename="Ashok",salary=5000) { console.log("This is constructor of class") this.eid=eid this.ename=ename this.salary=salary } showData() { console.log("Employee id ",this.eid) console.log("Employee name ",this.ename) console.log("Employee...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <head> <title>Demo of Template String in java Script</title> <script> let ename="Amit Sharma" let esalary=78000 let edept="IT" //document.writeln("Name="+ename + " Salary="+esalary + "...
Free Web development courses with real-time projects Start Now!! Program 1 class Account { constructor(accountid,accountname,amount=0) { this.accountid=accountid this.accountname=accountname this.amount=amount } withd(amount) { if(amount>this.amount) console.log("Invalid amount...") else this.amount=this.amount-amount } deposit(amount) { this.amount=this.amount+amount } showBalance() {...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <head><title>Java Script date Demo</title> <script language="javascript"> function validate() { var rn,name,p,c,m; rn=document.getElementById("STROLLNO").value; name=document.getElementById("STNAME").value; p=document.getElementById("STPHY").value; c=document.getElementById("STCHEM").value; m=document.getElementById("STMATH").value; if(rn=="") { alert("Roll No can not...
Free Web development courses with real-time projects Start Now!! Program 1 <html> <head><title>Java Script date Demo</title> <script language="javascript"> //alert(window.document.URL) // alert(document.URL) // function xyz() // { // var user // user=document.getElementById("USER").value // document.writeln(user) //...
Free Web development courses with real-time projects Start Now!! Program 1 "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) // indexof let s1="data flair free course indore" // console.log(s1.indexOf('a',4)) // // console.log(s1.indexOf('z')) let email=prompt("Enter your email...
Free Web development courses with real-time projects Start Now!! Program 1 // "use strict" // const ps=require("prompt-sync") // const prompt=ps({sigint:true}) // let s1=prompt("Enter a string") let s1="data flair free java script course" let s2=s1.slice(5,10)...
Free Web development courses with real-time projects Start Now!! Program 1 "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) let choice do { console.log("-------------Menu-------------") console.log("1.Addtion") console.log("2.Swap") console.log("3.Factorial") console.log("4.Exit") console.log("--------------------------------") choice=parseInt(prompt("Enter your choice")) switch(choice) { case 1:...
Free Web development courses with real-time projects Start Now!! Program 1 "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) let n=parseInt(prompt("Enter the limit")) let i,j for(i=n;i>=1;i--) { let x=' ' for(j=1;j<=i;j++) // x=x+'*' , x=x+j ,...
Free Web development courses with real-time projects Start Now!! Program 1 "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) let s1=prompt("Enter a string") // Dataflair console.log(s1.concat(" Indore MP").toUpperCase()) //s1=s1.toLowerCase() //s1.concat("indore") If you are Happy with DataFlair,...
Free Web development courses with real-time projects Start Now!! Program 1 //let s1="dataflair indore" "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) let s1=prompt("Enter a string") //console.log(s1.length) //console.log(s1.charAt(3)) data flair let count=0 let i for(i=0;i<s1.length;i++) {...
Free Web development courses with real-time projects Start Now!! Program 1 "use strict" const ps=require("prompt-sync") const prompt=ps({sigint:true}) let s1=prompt("Enter a string") //console.log(s1.indexOf("MP")) //console.log(s1.lastIndexOf('f')); //console.log(s1.search(/free/)) //console.log(s1.includes('free')) console.log(s1.match(/free/gi)) Did we exceed your expectations? If Yes,...
Free Web development courses with real-time projects Start Now!! Program 1 // n=12 // n%2?console.log("No is Odd"):console.log("No is Even") /// //a,b Grater between two number //let a=60,b=20,c //a>b?console.log("Grater Number is :" + a):console.log("Grater Number...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.awt.Color; import javax.swing.JOptionPane; public class TestGame extends javax.swing.JFrame { private int player1count=0; private int player2count=0; private String startgame="X"; public...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.util.*; public class TestMap1 { public static void main(String[] args) { Map<Integer,String> M=new HashMap<Integer,String>(); System.out.println(M.size()); M.put(1, "Limca"); M.put(3, "Water");...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.util.*; public class TestTree { public static void main(String[] args) { ArrayList<Integer>A=new ArrayList<Integer>(); A.add(5); A.add(2); A.add(6); A.add(2); A.add(4); A.add(1);...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.io.Serializable; public class Employee implements Serializable { private int eid; private String ename; private int esalary; transient private int...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.util.*; public class TestMain { public static void main(String[] args) { ArrayList<Integer>A=new ArrayList<Integer>(5); System.out.println(A.isEmpty()); A.add(4); //0 A.add(5); //1 A.add(53);...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.util.*; public class TestMain1 { public static void main(String[] args) { ArrayList<String>mylist=new ArrayList<String>(5); mylist.add("A"); mylist.add("B"); mylist.add("C"); mylist.add("D"); mylist.add("E"); mylist.add("F");...
Free Java courses with 37 real-time projects - Learn Java Program 1 package dataflair; import java.io.*; public class TestWriter { public static void main(String args[])throws IOException { File F=new File("c://dataflairfile/student.txt"); FileWriter fw=null; try {...