Disney web site - 81Chapter 7Programming Fundamentals, Part II2.Examine the following function

81Chapter 7Programming Fundamentals, Part II2.Examine the following function definition. Can you spot any problems with the defini- tion? If so, how can you fix the problems? function format(ohmage) { var result; if ohmage >= 1e6 { ohmage = ohmage / 1e6; result = ohmage + Mohms ; } else { if (ohmage >= 1e3) ohmage = ohmage / 1e3; result = ohmage + Kohms ; elseresult = ohmage + ohms ; } alert(result); 3.Devise your own syntax for the scenario of looking for a ripe tomato at the grocerystore, and write a forloop using that object and property syntax. 4.Modify Listing 7-2 so it does not reuse the hisDogvariable inside the function. 5.Given the following table of data about several planets of our solar system, create aWeb page that enables users to enter a planet name and, at the click of a button, havethe distance and diameter appear either in an alert box or (as extra credit) in separatefields of the page. PlanetDistance from the SunDiameterMercury36 million miles3,100 milesVenus67 million miles7,700 milesEarth93 million miles7,920 milesMars141 million miles4,200 miles …
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision professional web hosting services