+ 7
What is my mistake?
3 Answers
+ 6
@Artemis:- I think u didn't understand a question again.đ€...He wants to show the code that's why he wrote the JS code in <body> tag
About the problem in your code is :-
You didn't add "=" after id
It should be like :-
<input type ="number" id= "answer"></input>
+ 6
@Nikhil I DID UNDERSTAND IT!!!
+ 5
<div id ="code">
var a =Math.sqrt(36);<br />
console.log(a);</div>
you can't add JavaScript code in <div> tag you should use <script> tag