This is the input box part (HTML). Definition of the function and my currently unfilled for loop.
<input type="number" id="num1"><!--Fill in the number-->
<input type="number" id="num2"><!--Fill in the power-->
<button onClick="multByItself()">Enter</button>
<script>
function multByItself(){
var num1 = document.getElementById("num1");
var num2 = document.getElementById("num2");
for(var i = 0; i < num2; i++){
// I am unsure what to fill in here
}
}
</script>