Solve Grading Students (I am at a loss for words

PS. Im new to this, but im loving it. I watched a few tutorials on youtube on this one, and nothing works. This is my latest attempt, Where exactly am I going wrong? :frowning:

Can you please share your code so that we can help?

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

Hi all. I managed to figure it out. I went to a few sites to help me piece it. My apologies for not posting the problem. this is my current issue, its the next challenge. I got to the end, to no avail.

“Sock Merchant”

function findPairs(ar, find, pairs) {
if (ar.length > 0) {
let newArr = ar;

      if (newArr.indexOf(find) > -1) {
           newArr = [ ...newArr.slice(0, newArr.indexOf(find)),
           ...newArr.slice(newArr.indexOf(find) + 1)];
      return findPairs(

 return pairs;

function sockMerchant(n, ar) {
const min = 1;
const max = 100;

 ar = (typeof ar === "string") ? ar.split(' ') : ar;

 if (arar.length >= min
      && ar.length <= max
      && n === parseInt(n, 0)
      && n >= min
      && n <= max 
      && n === ar.length) {
           return findPairs(ar.slice(1), ar[0], 0);
 // if does not meet criteria return 0
 return 0; 


Why not put this code in the topic you already stated for that purpose?

Im sorry, Say what. you meant to put the code in the topic? UMMMM

Yes. I mean it makes sense to put this code in the topic you created for that problem.

Needing help in “Sock Merchant”