JavaScript Tutorial

JavaScript Project – ATM Bank Application Part – 2 0

JavaScript Project – ATM Bank Application Part – 2

Program 1 // ATM Application for Bank “use strict” const ps=require(“prompt-sync”) const prompt=ps({sigint:true}) class Bank { constructor(acno,name,amount=0) { // console.log(“This is create account method”) this.acno=acno this.name=name this.amount=amount } deposit(amount=0) { this.amount=this.amount+amount } withd(amount) {...

JavaScript Project – ATM Bank Application Part – 1 0

JavaScript Project – ATM Bank Application Part – 1

Program 1 // ATM Application for Bank “use strict” const ps=require(“prompt-sync”) const prompt=ps({sigint:true}) class Bank { constructor(acno,name,amount=0) { // console.log(“This is create account method”) this.acno=acno this.name=name this.amount=amount } deposit(amount=0) { this.amount=this.amount+amount } withd(amount) {...

typeof and instanceof Operator in JavaScript 0

typeof and instanceof Operator in JavaScript

Program 1 <html> <head> <title>typeof and instance of operator</title> <script type=”text/javascript”> /* /* JavaScript Data Type number boolean bigint string symbol null undefined */ document.writeln(“<center>”) document.writeln(“<h1>”) let a=123 let b=123.23 let c=true let d=123n...

Set Object in JavaScript 0

Set Object in JavaScript

Program 1 <html> <head> <title>Set Object Methods</title> <script type=”text/javascript”> document.writeln(“<center>”) document.writeln(“<h2>”) const myset=new Set([“Vishal”,”Rajesh”,”Vivek”,”Harish”,”Montu”,”Pintu”,true,123,34.55]) //myitr=myset.values() // for(let x of myitr) // { // document.writeln(“<br>”+x) // } // let s=prompt(“Enter value for search: “) //...

JavaScript Project – Currency Converter 0

JavaScript Project – Currency Converter

Program 1 <html> <head> <title>Currency Converter</title> <link rel=”stylesheet” href=”style.css”> </head> <body> <div class=”container”> <font color=”#501103″ size=”6″>Currency Converter</font> <div class=”form”> <label for=”amount”>Amount:</label> <input type=”number” id=”amount” placeholder=”Enter amount here ” /> </div> <div class=”form”> <label for=”fromCurrency”>From...

JavaScript Project – Guess the Number Game 0

JavaScript Project – Guess the Number Game

Program 1 <html> <head><title>Guess the Number Game </title> <script type=”text/javascript”> const compchoice=Math.floor(Math.random()*100)+1 let count=5 let i=0 let temp=true function guess_number() { let userchoice=parseInt(document.getElementById(“txtuser”).value) // alert(“User Choice: “+ userchoice) // alert(“Computer Choice: “+ compchoice) i++...

JavaScript Project – Guess Random Number Game Console Version 0

JavaScript Project – Guess Random Number Game Console Version

Program 1 //Guess Random Number Game(Console Application) “use strict” const ps=require(“prompt-sync”) const prompt=ps({sigint:true}) let choice do { let compchoice,userchoice let count=5 let i=0 compchoice=Math.floor(Math.random()*100) console.log(“———–Guess Random Number Game—————-“) console.log(“Enter your guess(0-99) and if you...