-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91f6e18
commit 5e614ad
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Async</title> | ||
<link rel="shortcut icon" href="#" type="image/x-icon"> | ||
</head> | ||
<body> | ||
<h1>Chai aur code</h1> | ||
<button id="stop">Stop</button> | ||
</body> | ||
<script> | ||
const sayAman = function () { | ||
console.log("Aman"); | ||
}; | ||
const changeText = function () { | ||
document.querySelector('h1').innerHTML = "best js series" | ||
console.log("im done"); | ||
} | ||
|
||
|
||
const changeMe = setTimeout(changeText,2000); | ||
|
||
document.querySelector('#stop').addEventListener("click",function () { | ||
clearTimeout(changeMe); | ||
console.log("Stopped"); | ||
}) | ||
</script> | ||
</html> |