Copy the following file and execute it in your browser. What's wrong with it and why? Can you fix it?
Write a function that will calculate and return the amount that should be paid as a tip for a resturant bill. The tip will be 20 percent of the total bill.
Create a function called changeColor() that will be called when the user presses one of two buttons . The first button will contain the text " Press here for a yellow background ". The second button will contain the text " Press here for a light green background ". The function will take one parameter, a color. Its function is to change the background color of the current document.
What is recursion? What is the danger of using it?
Write a function that returns the total cost of any number of buckets of paint. Ask the user how many buckets he is going to buy and for the cost of one bucket. Ask him the color of the paint. Calculate and return what he owes. Change the color of the font to the color of the paint.