You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And make the next couple assignments until your reach: Assignment with a Returned Value
Add a useful function to your website:
Write a js feature that follows the following rules
It takes user input on a website (look up input fields)
It uses that input as parameters for a function
The function does something with the parameters and returns a value using 'return'
The return value is used on the website.
For instance: Create a function that allows people to input a certain product they eat or drink every day and then asks how long they expect to live (for instance someone smokes one pack of cigarettes a day and expects to live 25 more years) then they might spend 1 X priceOfPack x 365 x lifeExpectancy euros on that product
Be creative. If your idea is too complex to finish, don't worry, this exercise is really about trying to write some code yourself and applying what you've learnt.
Try to solve Unmesh' challenge:
Assignment for “for loops” :