小弟最近在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.
真的试了很久
拜托大家了