get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home

Hey, all... I was working on 'finders keepers' bonfire and looking at some of the built in array methods like .some()

```
function find(arr, func) {
var num = 0;
return num;
}
find([1, 2, 3, 4], function(num){ return num % 2 === 0; });
```

and I don't know the right words to search this... it feels like something I learned but can't see:

If I have a function(1) that takes another function(2) as an argument, how do I write the function(1) to pass in a variable to the other function(2) when it's called? What is the syntax?

aw, crap. you know all it took was typing it out. you just use the variable name the referenced function uses, don't you?

hi @TimRizzo

that's right

seems that you already solved the problem

@crisberrios Well, at least I've got the right tools now :-)

My English is failing me on the smallest-common-multiple bonfire. I thought we had to calculate the least common multiple but if that's the case then the tests don't make much sense. Does anyone have a better explanation of the objective for it?

@waeren Even division is exact division with no remainder .

but for input [5,1] shouldn't it just be 5 instead of 60?

Yeah. I have to think about it for a moment :)

@waeren I think we need to find the smallest number that *gets divided evenly* by all the numbers in the list .

So 1, 2, 3, 4, 5 all divide 60 and I think there is no number smaller than 60 that gets divided by all of them.

That makes sense, thanks for the help!

@waeren No problem. But I think I should tell the guys who moderate these bonfires about this.

Might've been just a brain fart on my end though. After your explanation I reread the challenge and facepalmed when I saw the word range in there twice.

@waeren English is not my native language. But still I think the bonfire asks us to find the smallest number **that divides** all the number in the range. So it asks us to find a number that will in the denominator of the fraction right ?? Or am I missing something here ?

Mm true, maybe the following would be better:

Find the smallest number that gets evenly divided by all numbers in the provided range.

Find the smallest number that gets evenly divided by all numbers in the provided range.

tbh I just used wolfram alpha and searched for smallest common multiple (1,5)

Math can be pretty confusing if it's in a different language

Math can be pretty confusing if it's in a different language

@waeren Yeah . I always scored less in Mathematics because most of the time the language felt alien to me. :worried:

I also calculated the lcm of 1, 2, 3, 4, 5 and the answer was 60 :smile: So we just have to calculate lowest common multiple of numbers given in the range and we are done. :+1:

Hey ya'll, super basic jquery question for anyone. You can probably tell that my attempt to fadeout the last list item here is wrong, but I can't remember what i'm supposed to do to get it right:

:question:

$(document).ready(function() {

var $target = $("<li>").last;

$target.fadeOut('fast');

});

var $target = $("<li>").last;

$target.fadeOut('fast');

});

It's actually the last list item in the <ol>

it should be 'li'

and i'm not 100% sure but I think it might be last() and not last

ah

also thanks to getting rid of the <> i just realized that this works too:

check jQuery docs

it's the best resource :)

var $target = $("li:last-child");

jquery docs, ok

thank you!

@crisberrios Hey I have to ask you something. I was helping one fellow FCC member in solving a bonfire question Smallest common multiple.

But we both concluded that the problem statement is a bit confusing.

It asks us to find the smallest number that evenly divides all the numbers in the given range. But we found out that it should be *the smallest number* that gets ** evenly divided** by each of the number in the range given. In the former case , the required number should be the denominator of the fraction, but in the latter case, it is the numerator. I hope I clearly mentioned my concern :smile:

I haven't solved the problem. But if I consider my assumption, then we just have to find the lowest common multiple of the range of numbers given.

Can you please look at it ??

yes, I think your wording is right

the other case would be GCD

Yup :+1:

@Sudeepto it was indeed the least common multiple for all numbers in the range that got the challenge solved. Thanks again!

@waeren No problem. But I should thank you because of you, I revisited Wolfram alpha after such a long time and revised about LCM :P

OK, i'm working on the HTML escaped characters bonfire and trying to use a regex, but even the simplest one isn't working for me. If I replace 'reg' with '&' it works fine but not with the regex. What am I doing wrong? Note: I havn't implemented the replace yet, just testing my code / method.

for regex you need to use other syntax

like

`var reg = /x/`

not a string

and for matching you use either .test or .match depending on the case

for replace you can use regex too

str.replace(regex,string) (or even functions that work with saved groups)