我嘗試了很多方法......我在做什麼錯?我決心學習,真正理解這一點。如何打印到屏幕 - 「console.log不是一個功能」
//On line 2, declare a variable myName and give it your name.
var myName = "Jeanne";
//On line 4, use console.log to print out the myName variable.
console.log ("Jeanne");
//On line 7, change the value of myName to be just the first 2 letters of your name.
myName.substring(0, 2);
//On line 9, use console.log to print out the myName variable;
console.log("Jeanne");
我一直得到的錯誤是:TypeError:console.log不是一個函數,這部分是我困惑的原因。 – tooheymomster
如果使用IE瀏覽器:http://stackoverflow.com/questions/690251/what-happened-to-console-log-in-ie8,http://stackoverflow.com/questions/5472938/does-ie9-support-console -log-and-is-it-a-real-function/5473193#5473193(如果你使用的是不同的瀏覽器/環境,則酌情搜索) – 2012-12-28 07:41:45