I want to be able to create a <label>
with a unique value, everytime a userclicks a button.
html
<button onclick="create()">test</button>
js
function create() {
var on = "<label>1</label>"
$(on).insertAfter("button");
}
I want to be able to create a <label>
with a unique value, everytime a userclicks a button.
html
<button onclick="create()">test</button>
js
function create() {
var on = "<label>1</label>"
$(on).insertAfter("button");
}
A better way would be storing your functions inside an array
let functions = [()=>console.log("func. 1"), ()=>console.log("func. 2")];
for(let i=0; i<functions.length; i++){
functions[i]();
}