Hi there! I'm Ada, your AI assistant.
Thank you for applying for the Junior JavaScript Engineer role. Excited to kick-off this chat with you. 🎉
It will be ~35 min chat. We will discuss a few interesting, discussion-oriented tech challenges. Hopefully we can learn a little bit from each other. 😀
Just say hi when you're ready to begin!
Hi Ada
Thanks for joining!
Just double checking: Are you online from your laptop? There are coding challenges involved so make sure you're using your laptop and not your phone for this chat.
Yes, let's start! 😎
What will the following code output?
Error 1
A rejected promise is caught by nearest catch and what is returned inside catch continues the promise chain. Do you want to try again?
Error 1, Success 4
Cool, thank you for your response.
What will the following code output?
Total money in account: 55 Total money in account: 53
Got it.
Let's move to the final challenge before we wrap up!
We're designing a office management system. We're logging the time when a user enters and when they exit. We want to build a feature where to count the total number of people in the office at any given time. Can you design such a function?

The first line of the input is the time we want to run the query for, and the next line is the number of entries, N in the log; 0 < N < 100. Each of the next N lines is an log for a particular day, and a log might not have a corresponding exit time if the person is still in office. Check out the default input in stdin section of the code editor for an example.
Sample input: 14:09:56 4 10:43:12 21:05:02 11:14:34 23:23:12 14:11:46 15:12:13 18:49:39
I have a doubt regarding the question
Are the logs sorted in any particular order?
Yes, they are sorted by the entry time.
I have a doubt regarding the question
Hint: What's wrong with my code?
Your code doesn't seem to work for the test case where a user entered the office before the query time but hasn't left the office yet.
Can you fix your code to include that edge case? 🙂
Great, your code seems to work for all testcases now. Your code will also be submitted, make sure your variables are named appropriately. 😛
Do you want to move forward? If you say YES, you won't be able to come back to this question or the edit the code.
Great, that's it from my end for now.
It was really nice talking to you. 😬
Would you have a minute to give me some quick feedback? This is completely unrelated to your application process, and I would really appreciate honest feedback from you. 🤞
Okay, thank you!
Thank you for taking the time to chat!
Have a fantastic day, bye! 👋
Bye! :D