Ok, so, I presented an idea to my counselor who encouraged me to go along with it and maybe even carry it with me to keep working and updating it as my study plan progresses; that sounded like a great idea to me.
What I wanted to attempt was to make a website that emulates rocket pool basically. My counselor suggesting doing the best equivalent I could using JavaScript. So basically I wanted to show what I have so far and let everyone know specifically what I THINK my issues are what I actually want/need to get accomplished. Thank you in advance to anyone/everyone for helping.
html
head
script src=“https://ajax.googleapis.com/ajax/libs/jquery.min.js”></script
script
function greet(){
alert(‘Your staked assets will now accrue interest until such time as you withdraw them or there are no more rewards to earn!’);
}
/script>
/head>
body>
form id=“demo” onsubmit=“greet(); return false;”>
input id = “name” placeholder=“Asset” type=“text”/>
input type =“submit”/>
/form>
script>
const accrueInterest = 1000;
let asset = 0;
while (accrueInterest){
console.log(There are ${asset} gaining interest.
)
asset++;
if (asset === 1000){
console.log(“There are no more rewards to earn!”);
break;
}
}
/script>
/body>
/html>
A. When the user enters a number into the Asset box and clicks submit, the number stays in the box, as if it wasn’t submitted.
B. Another issue I’m having is that my while loop starts running and printing to the console before any input has been submitted by the user.
C. Lastly, I need a way to store the input from the user and call it back later to show the user how it has changed.