Kaun Gayn
Coder
what's wrong in this coding ?
<!DOCTYPE html >
<html>
<body>
<h1 id= word> hello <h1>
<button onClick = "myFunction()"> click here <button>
<script>
var variable1 = Hi world
function myFunction() {
if (true) {
document.getElmentById("word").innerHTML = variable1;
}
</script>
</body>
</html>
<!DOCTYPE html >
<html>
<body>
<h1 id= word> hello <h1>
<button onClick = "myFunction()"> click here <button>
<script>
var variable1 = Hi world
function myFunction() {
if (true) {
document.getElmentById("word").innerHTML = variable1;
}
</script>
</body>
</html>