parent
4e7c88da03
commit
5c9efd68e1
@ -0,0 +1,24 @@
|
|||||||
|
let arr = [];
|
||||||
|
console.log(arr);
|
||||||
|
let secondArr = [5,4,3,2,1];
|
||||||
|
secondArr.sort();
|
||||||
|
console.log(secondArr);
|
||||||
|
|
||||||
|
let check = 1;
|
||||||
|
|
||||||
|
function tryingHere(){
|
||||||
|
const trying = "This is Ashish Bhoya";
|
||||||
|
const MikeRoss = "This is legendary Mike Ross";
|
||||||
|
if(check ===1)
|
||||||
|
document.getElementById("Ok").innerHTML = trying , check = 0;
|
||||||
|
else
|
||||||
|
document.getElementById("Ok").innerHTML = MikeRoss, check = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function table(){
|
||||||
|
let num = document.getElementById("input").value;
|
||||||
|
document.getElementById("tableHere").innerHTML = "";
|
||||||
|
for(let i = 1; i<=10; i++){
|
||||||
|
document.getElementById("tableHere").innerHTML += `${num} * ${i} = ${num*i} <br>`;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<script src = "first.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
This is Ashish just doing some random stuff.
|
||||||
|
This is the array.
|
||||||
|
<div id = "Ok">
|
||||||
|
This is the current content.
|
||||||
|
</div>
|
||||||
|
<button onclick="tryingHere()">Press me</button>
|
||||||
|
<input type="text" id="input" placeholder="Enter the number here"> </input>
|
||||||
|
<button onclick = "table()" id = "table"> Click here to print the table of the Number Typed</button>
|
||||||
|
<div id = "tableHere"> Here the Table will get printed once the number is entered </div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue