<p>Click the button to calculate x.</p>
<button onclick="myFunction()">Try it</button>
When I place the above code, it will show me following result:
If I press button "try it" it will show me a result 7.
Please give me an example.