Created
February 8, 2019 18:43
-
-
Save ehzawad/c91e96c32c40c67778d273670095a261 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>heck</title> | |
<script src="counter.js"></script> | |
</head> | |
<body> | |
<h1 id="myCounter">0</h1> | |
<button onClick="hellCount()">Increment</button> | |
</body> | |
</html> |
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
let count = 0 | |
function hellCount(){ | |
count++ | |
// const damn = document.querySelector("#myCounter").innerHTML | |
// let value = Number(damn) | |
// | |
// value = count; | |
// document.querySelector("#myCounter").innerHTML = String(value) | |
// Lol... You don't have to think of type | |
// doesn't matter | |
document.querySelector("#myCounter").innerHTML = count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment