This is not my code, I copy and pasted it from stack overflow. I am trying to understand what I am looking at here. I know that from the task i am to "Return a function that takes a list of valid users". Ok, so the function that comes with the boiler plate, will now return another function and this third function will return a function if all users exist.
I am confused on why we would use the every and some methods. Both check if the values are uniform, right ? Maybe things would clear up if i knew how the code was executed. Thank you in advance for reading my post and to your response.
My Code
This is not my code, I copy and pasted it from stack overflow. I am trying to understand what I am looking at here. I know that from the task i am to "Return a function that takes a list of valid users". Ok, so the function that comes with the boiler plate, will now return another function and this third function will return a function if all users exist. I am confused on why we would use the every and some methods. Both check if the values are uniform, right ? Maybe things would clear up if i knew how the code was executed. Thank you in advance for reading my post and to your response.