[問題] 新手學習上遇到瓶頸
小弟最近在codecademy上面學習JavaScript
但遇到瓶頸,找了很多資料研究了很久還是無法突破
想拜託版上的大大跟神人幫忙解惑
題目:
Okay! Go ahead and add that second for loop inside the body of your if
statement.
我打的:
/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Emily.";
var myName = "Emily";
var hits = [];
for(var i = 0; i <myName.length; i++){
console.log([i])};
if (i=5) {
console.log("5");
}
if (text[i] ==='E') {
console.log("5");
}
var myName =[ ];
myName.push("alen","ELLE","pig");
myName[0];
for(var i = 0; i <myName.length; i++){
console.log([i])};
系統回應如下
Oops, try again. Careful: your second 'for' loop should stop when it reaches
its current point in the string + myName.length.
真的試了很久
拜託大家了
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 175.180.141.138
※ 文章網址: https://www.ptt.cc/bbs/Ajax/M.1444115510.A.B02.html
※ 編輯: bunnystar (175.180.141.138), 10/06/2015 15:13:06
推
10/06 15:29, , 1F
10/06 15:29, 1F
→
10/06 15:30, , 2F
10/06 15:30, 2F
→
10/06 17:14, , 3F
10/06 17:14, 3F
推
10/06 20:01, , 4F
10/06 20:01, 4F
→
10/06 20:42, , 5F
10/06 20:42, 5F
推
10/06 21:16, , 6F
10/06 21:16, 6F
→
10/06 21:19, , 7F
10/06 21:19, 7F
→
10/06 21:51, , 8F
10/06 21:51, 8F
推
10/06 23:43, , 9F
10/06 23:43, 9F
→
10/06 23:46, , 10F
10/06 23:46, 10F
→
10/06 23:47, , 11F
10/06 23:47, 11F
→
10/21 09:18, , 12F
10/21 09:18, 12F
討論串 (同標題文章)
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章