作者chevalierxd (獨孤求噓-風青羊)
看板java
標題[問題] 新手遇到var問題
時間Mon May 13 18:59:31 2013
剛剛開始自學 用網站的教學
我照她說的做了 可是還是不對 請問哪裡出問題了?
// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "TAIWAN";
// Use console.log to print out the length of the variable myCountry.
console.log("myCountry".length);
// Use console.log to print out the first three letters of myCountry.
console.log("TAIWAN".substring(0,3));
這是她顯示錯誤的地方
Oops, try again! It looks like you didn't log the length of myCountry to the
console.
可是我不是有用length了?
感謝回答~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.213.89.161
→ Ansaga:myCountry.length? 為什麼要加"" 05/13 19:09
推 johnny94:這是 Javascript 嗎? 05/13 19:52
→ kyoin:看到標題還以為JAVA出新版的SDK了 05/13 20:45
→ chevalierxd:他的教學大綱是寫JAVA@@ 05/13 21:03
→ chevalierxd:感謝一樓 問題解決了~~ 05/13 21:08