I really need help with my research project: How to add more paragraphs to change on the click of the button like "Third Paragraph" and "Forth Paragraph" and in the last click the (Forth Paragraph) I want to change the paragraph and button text together, the paragraph to another text and the button from (click) to (Hint)?
var time = 0;
function changeText(txt) {
var txt = (time === 0) ? "First Paragraph" : "Second Paragraph";
document.getElementById('name').innerHTML = txt;
time++;
}
<body>
<p>
<b id='name'>{description}</b>.
</p>
<input type='button' onclick='changeText()' value="click" />
<br /><br />
</body>