Challenge 1 Megathread

For any and all questions relating to challenge 1.

Need some help with the first challenge? Watch this video from Jenny at Women in Web Development.


How can I find the notes?

The notes?

Do you mean the challenges? I feel they will unlock once the counter on this page reaches zero:

Or did you mean these training resources? (looks like the same link in the preview, but it isn’t)

Or was it something else entirely?


1 Like

Reminder that challenge one opens Nov. 1 at midnight Pacific! That’s 3 a.m. EDT. Good luck!

If you’re confused with the code editor, I recommend checking out this video from our education team that gives you a run-through of everything you need to know about the challenge page.

1 Like

I have a question related more to the logic of the question, rather than coding help. What happens if the neighbourhoods can’t be split evenly? For example 10 neighbourhoods and 3 volunteers. Should we round down, or do you want us to give multiple solutions (2 volunteers do 3 each, one does 4)? Or are we allowed to use decimals? So in this case answer would be 3.33 and it just means each volunteer does 33% of the last neighbourhood.



I get that this is suppose to be a quick example but as a real life example wouldn’t it be better to take into account the size of each neighbourhood in order to manage a more even distribution? Whether that be by using population density, or the number of households, or even the area of the neighbourhood (to equalize travel distance). Theoretically just calculating for the number of volunteers vs the number of neighbourhoods could in reality create large variances in the amount of work that each volunteer would actually be required to perform (unless each neighbourhood in codeville was exactly the same size and had the same population density, or number of households).
Also in relation to getting the task done most efficiently we might also have to take into account the skill level and abilities of the volunteer.
Are there any other variables that any one else can think of that might be needed to take into account to solve this issue in a real world scenario that I haven’t covered? Just a theoretical question.

1 Like

Yeah i was thinking of the same thing , i wrote the logic, but the output wants what it wants instead what we want it to show.

Yes, you are correct that there are many questions that can be asked in regard to this challenge, but remember this is a programming challenge for beginners and the points you are making are business decisions. At this stage, I don’t think it needs to be too complicated. If you want to add more complexity to the challenge that is up to you as long as you get the expected output.



I did the day 1 challenge and i print the answer in the console. but having issues to use assertion. Do I need to import any libraries.

Hey guys so I’m trying to figure out the first challenge but I’m a beginner and completely lost on what the challenge requires. Is there a proper way of working my way to the right answer?


Your goal is to write the function. If you are using an editor (eclipse, IDEA, etc.) and want to execute your code there, the assertion line is the one that calls the function you are writing. So it’s possible that you might get an error. Instead you can call your function like this: console.log(doorToDoor(volunteers, neighbourhoods)); to display your answer in your editor.

The doorToDoor function will be receiving data from the Input described and you are required to write the code to return the Output. If you click on Hint you will get some more information about how to complete the challenge.

Thanks for the reply.
same way i did it in the code challenge editor but its failing.
var work = doorToDoor(noOfVol, noNeign);

What do you mean by failing? Are you getting an error message? Are you not getting the correct answer?

I don’t know if we need an extra var inside of the const

I thought that const are the same as var

It could be ‘failing’ because the arrays that store the volunteer and neighbourhood information are named differently than noOfVol (actually named ‘volunteer’)

1 Like

I have to say for this being a beginner’s challenge we’re only on day 1 and I already feel quite overwhelmed/confused :grimacing:


Hard to learn on such a tough challenge! It’s the dividing part that has me stumped right now

1 Like

Right? Beginners my ass


the division operator in js is /
var quotient = firstNumber / secondNumber;

1 Like

The example has the parameters as volunteers & neighbourhoods and that is what you should use in this function. However, you can name them anything you like and use them in the function with the same names. (use descriptive names so you and others can easily understand what they refer to)