#Hi, help please. I do not know what to do, nor do I know what I dont know, can someone be patient.

18 messages · Page 1 of 1 (latest)

stuck bobcat
#

JavaScript\Bird Watcher exercise
export function totalBirdCount(birdsPerDay) { for (let i = 0; i < birdsPerDay.length; i++) { total += birdsPerDay[i]; } export function birdsInWeek(birdsPerDay, weekNumber) { for (let i = 0; i < birdsPerDay.length && i < weekNumber; i++) { }

quasi creek
#

What's the problem? Does a test fail? Which test? What does it say?

#

Are those preceding numbers actually in the code?

stuck bobcat
#

the problem is that I am stuck on question 2, I am not even sure question 1 is correct but I do not know how to go about task 2, I do not know how to calculate more than one thing using for loops and I am not sure I understand how to write statements

#

I added the numbers so that its clear which question I was answering

quasi creek
#

If the tests pass then that's a pretty good indication you got it right. If the tests do not pass, then it's not right and you should fix it so the tests pass. Do the tests pass for the first task?

stuck bobcat
#

when I run the test it gives this response: We received the following error when we ran your code:

Unexpected end of script

quasi creek
#

The numbers make the code invalid 🙂 it's better to share the exact code and use words like the function's name to describe what you're stuck on

stuck bobcat
#

no I only added the numbers here not in my actual code/

quasi creek
quasi creek
#

It's really hard to give feedback on issues when what you share it different from what you actually run

stuck bobcat
#

We received the following error when we ran your code:

Importing binding name 'birdsInWeek' is not found

quasi creek
#

Sounds like your code is missing that function definitely now

stuck bobcat
#

but the function is there?

quasi creek
stuck bobcat
#

I have never used "import", all the previous excercises required a "export" before the function name

quasi creek
#

Yes. Your code exports the functions. The tests imports them. Or tries to.