---
title: "Comment by faruk suleiman on \"Urgent 2k for JavaScript Developers\" | Hashnode"
description: "This function picks an email from an array of students who submitted assignments and checks for a match in the array containing all students&#39; emails while t"
url: "https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa/comment/6168d72253401f641ba1767c"
---

[Discussion](https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa)

Comment [Urgent 2k for JavaScript Developers](https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa)

[faruk suleiman](https://hashnode.com/@farukade)

[Oct 15, 2021](https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa/comment/6168d72253401f641ba1767c)

![solution2.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1634260559165/mBQXu-GTl.jpeg)

This function picks an email from an array of students who submitted assignments and checks for a match in the array containing all students' emails while traversing. Once found, it deletes the email from the array (all students email array). At the end of the loop, the emails of students who did not submit will remain and the function returns an array containing their emails, the number of students who submitted, and the number of students who didn't. 😁😁😁 Not the best of solutions but it was fun giving it a try.

[Ayodele Samuel Adebayo](https://hashnode.com/@unclebigbay)

[Oct 15, 2021](https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa/comment/6168d72253401f641ba1767c#reply-6169100418374f257327a033)

Well-done,

Please can you submit your code solution on GitHub gist, along with the file to test with?

Then share the URL here

[faruk suleiman](https://hashnode.com/@farukade)

[Oct 15, 2021](https://hashnode.com/posts/urgent-2k-for-javascript-developers/61685e0353401f641ba16faa/comment/6168d72253401f641ba1767c#reply-6169502818374f257327a5c6)

[Ayodele Samuel Adebayo](https://hashnode.com/@unclebigbay) , Thank you, sir,

Here's the link below 👇👇. I saved the test emails in an array for easy access.

[gist.github.com/Omar-Faruk-tech/cbbdabe04947e4ce8…](https://gist.github.com/Omar-Faruk-tech/cbbdabe04947e4ce892af886b94e07b4)
