Make button that says how many times it has been clicked.

<button id="count" onclick="showCount()">0</button>
var x = 0; function showCount() {
  x++;
  document.getElementById("count").innerHTML=x;
}

PW

Related Javascript Mentoring answers

All answers ▸

How are objects created in arrays


How do you create objects in javascript?


What is the importance of javascript in the web?


How to check if value exists in an object in JavaScript?