С Vanilla. * Только 1011 *, это должно помочь вам:)
const myArray = ["stone", "paper", "scissors"];
const el = document.getElementById('myButton');
el.addEventListener('click', function() {
const div = document.getElementById("result");
myArray.forEach((currentValue, index, array) => {
let text = index == (array.length - 1) ? `${currentValue}` : `${currentValue}, `;
let content = document.createTextNode(text);
div.appendChild(content)
});
}, false);
#result{
width: 20rem;
height: 1rem;
margin-top: 2rem;
border-width:3px;
border-style:dashed;
border-color:#FFAC55;
padding: 15px 20px;
}
<!DOCTYPE html>
<html>
<body>
<button id="myButton">Try it</button>
<div id="result"></div>
</body>
</html>