at the moment when I run the code below - I press the button it changes from Davyd to Aces , and Ace to davyd. Now how do I make the button change from Davyd to Ace to Walter to Juan?
<html>
<script>
function myFunction() {
if (document.getElementById("davyd").innerHTML == "Acea") {
document.getElementById("davyd").innerHTML = "Davyd"
} else {
(document.getElementById("davyd").innerHTML == "Davyd")
document.getElementById("davyd").innerHTML = "Acea"
}`enter code here`
enter code here
};
</script>
<body>
<h1>A JavaScript-Enhanced Web Page</h1>
<p id="davyd">Acea</p>
<button type="button" onclick="myFunction()">Try it</button>
</body>
</html>
Thank you! Brand new to Javascript