@LBOD2000 - I did something like this - find the unique values by comparing (filtering) arr1 against arr2, then doing the reverse - filtering arr2 against arr1. After that, concatenate the two arrays that result (with the unique values from each input array) and return that.With the code that you are using, you're comparing each element of arr2[j] against arr1Test (for example, in your first loop) so you are finding the values that are common in each one, instead of the differences. Your technique will not be correct for finding the differences.OOPS - i just looked at the second half of your code - you are still doing a similar thing there - you are comparing each element in the newArr against each element in arraysConcat, so you have multiple chances to find things that match and things that don't. You really only want one answer - you want to find the numbers that either do exist or don't exist (depending on whether or not you're trying to remove elements or keep them in your final array). You don't want to get multiple answers for each value. Using something like .indexOf() to search for a value is a better option.

@gersho - Yes, the recommendation from places where you read about coding practices is to use the curly braces, because as @sjames1958gm says, it can cause problems if you add another statement and were expecting it to be part of the "if" conditional clause. It's one of the things that are probably best avoided...

Hello everyone! Can anyone recommend learning material for JavaScript? What has been the best way for you to learn and understand JavaScript? The reason I’m asking, I have just started a Web Developer role and it’s a completely new field. I knew the basics of JavaScript, but this is a whole new level for me. I have a bit of imposter syndrome and just want to do as good as I can at this job. I’ve always wanted to be a web developer and now that I am I feel like I can’t do the job. Any advise on learning would be great! Thank you 🙏🏼

@relentless-coderHey, I need some help here. I was browsing the gsap library, and I came across this example, can anyone tell the concept behind this scroll?http://www.yebocreative.com/en/hey/how are they able to show different sections as if the page is being scrolled?

@bradley1492 I think it is more common these days to use these in place of loops. Of course they require arrays, so if you have a loopthat is not array based you probably need a different loop, although functional programming purists would probably disagree

@sjames1958gm@ezioda004 Okay thanks for your answers, @ezioda004 I already know the funfunfunction video :), it sort of brought me to my question about this topic. It just seems difficult from time to time, to imagine that some people don't use loops at all. At least for the fcc challenges, with a beginner to indermediate skillset in mind :)

I am just stuck in a situation in which I don't know on how to come from loops to reduce. I think I have to ask this anyway here in a few minutes...

@bradley1492 I'm also in the same situation, I try to use as much higher order functions as possible, but sometimes I end up using good'ol for loop, but I think with time (hopefully) I'll be more comfortable using them.

In my code I work with the includes-method in combination with filter to determine if one array includes a value of the other one.Now I know that my next step in the challenge is to find out, how I can "scale" these steps to multiple arrays.But I don't really have a clue on how to continue.How can I check values of arrays against each other with the includes method no matter how many arrays are involved?

I guess, it comes down to reduce, but I am not quite sure, on how I would construct this...

@ezioda004 Yeah, in the pen I just posted, there is a for-loop included that I couldn't avoid :)

@bradley1492 in this case call invokes reduce (it is a function on the reduce function object)and the first value passed to call is the "this" value for the callarguments looks enough like an array that reduce can process it as an array (has length, and properties accessed by numbers

@bradley1492 As you get more comfortable with reduce, filter and map, the amount of code you write will shrink