shishantpandeySep 7, 20221 min readfind sum of number in advance mode javascriptvar myinputarr = []; var size = 5; // Array size alert("enter number and press enter if need not mare press cancle"); myinputarr[0] =...
shishantpandeyAug 28, 20221 min readCODE TO MAKE A GAME (GUSSE THE NUMBER)<script> // a simple code to gusse the right number console.time("gusse time"); let randomnumber = Math.random() * 100; randomnumber =...
shishantpandeyAug 23, 20221 min readFIZZBUZZ IN JSfor (let i = 0; i < 101; i++) { if (i % 3 != 0 && i % 5 != 0) { document.write(i, ","); } if (i > 0 && i % 3 == 0 && i % 5 != 0) {...
shishantpandeyAug 22, 20221 min readHOW TO FIND FUM OF FIRST N NATURAL NUMBER IN JAVASCRIPTlet sum = 0; let lastnum = prompt("enter the number"); a = Number.parseInt(a); for (let i = 0; i <= lastnum; i++) { sum = i + sum; }...
shishantpandeyAug 22, 20221 min readHOW TO FIND HCF LCM IN JAVASCRIPTFOR HCF let a, b; a = prompt("enter first number"); b = prompt("enter sec number"); a = Number.parseInt(a); b = Number.parseInt(b); max...