| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Week 7

Page history last edited by Rick Fitzgerald 12 years, 1 month ago Saved with comment

Week 7 Session

 

Summary:

*Lesson: Loops (for and while loops) in JavaScript

*Project: Getting Dicey (follow up to the dice game)

 

Questions


 

Rick Fitzgerald: A question on Loops 6.3: I can't seem to get my code to be accepted, and I'm not getting help from Q&A. It's probably some small dyslexic error but I don't see it. Thanks!

 

function substring(start, all, end) {

    if (start >= end) {

        console.log(all[start]);

    }

}

 

 

 

Discussion/observations


 

Comments (2)

byoose said

at 11:20 am on Mar 4, 2012

Rick: You might want to see if flipping "start" and "all" around in the function parameters will get you the OK. In their instructions they state: "Define a substring function that takes the parameters all, start, and end." You currently have (start, all, end).

I've noticed that Code Year is very particular about how you follow their instructions. I've been caught in having to change some spelling in the string variables one too many times...

Rick Fitzgerald said

at 11:30 am on Mar 4, 2012

Becky:
That was it! Thanks very much.
Rick

You don't have permission to comment on this page.