| 1. |
Solve : Javascript document.write? |
|
Answer» Would someone look at this statement and let me know why it won't PRINT. " + emissionyear(0) + "the world generated " + emissionamount(0) + " million metric tons of carbon dioxide EMISSIONS from fossil fuel consumption. ");document.write(" " + emissionyear(1) + "the world generated " + emissionamount(1) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(2) + "the world generated " + emissionamount(2) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(3) + "the world generated " + emissionamount(3) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. "); ;document.write(" " + emissionyear(4) + "the world generated " + emissionamount(4) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(5) + "the world generated " + emissionamount(5) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");document.write(" " + emissionyear(6) + "the world generated " + emissionamount(6) + " million metric tons of carbon dioxide emissions from fossil fuel consumption. ");/* ]]> */ Arrays are indexed in javascript via square brackets ([]) rather then parentheses.Some extra info |
|