functionfactorialize(num){
// in here
}
// not here
Ian
@Naiguy1
ok oll try that
Kevin Galang
@kgalang
Only leave the default code outside of the function
Ian
@Naiguy1
this is what i did and it is still being weird function factorialize(num) { var factorialize = 1 2 3 4 5 == num; var factorialize(5); return num; }
Kaz Baig
@kbaig
@Naiguy1 can you explain the logic you're trying to follow
var factorialize(5) is invalid code
you use the var keyword to define variables with the name that comes right after them
Ian
@Naiguy1
it said it wasn't defined so I put "var"
function factorialize(num) { var factorialize = 1 2 3 4 5 == num; return num; } factorialize(5);
but it still is wrong
Kaz Baig
@kbaig
var factorialize = 1 * 2 * 3 * 4 * 5 == num;
what are you trying to do here
the above code means "does 120 equal num"?
Ian
@Naiguy1
Multiply it by every positive integer less than or equal to it
Kaz Baig
@kbaig
You need to go through the logic of how to calculate a factorial for any number, and try to implement that
Ian
@Naiguy1
ok, how do I make sure it it is positive
Kaz Baig
@kbaig
Well, what logical steps do you have in mind right now?
Ian
@Naiguy1
Using < ,>,and <= to make it a less than or equal to it but positive.
Kaz Baig
@kbaig
No I mean in plain english, what steps do you take to go from a number to the factorial of that number
Ian
@Naiguy1
I have to multiply it by every positive integer that is less than or equal to it. So I will use <= to find all integers less than or equal to it then, I will use > to narrow it down to all that are above 0.
Then some how i will multiply it by them in order.
How would I get them in order?
Kaz Baig
@kbaig
@Naiguy1 You don't need to manually find all the 0 <= integers <= num. If you do your for loop right, you can get it to do that part for you
on chrome dev tools, no matter the screen size my page shows the background image fine. But, when I use it on any browser on a small screen phone, a note 8, or a tablet my background image doesn't show! any ideas?
Dan Lafferty
@DanLaff
@slamoureux Lots of ideas, but too many list without more details - can you share the code?
bv
@binduverma1
I made a template for Random quote generator and I change the text in the html with jquery but I am clueless how to do it with json. Excercise at FCC did not explain. I checked W3 school but do not see how to do it with a Google API.
bv
@binduverma1
Can some one suggest an API for random quote project?
.... how do I know what is format of data on that API