Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
pragya1248
@pragya1248
:)
Daniel Feldman
@Feldbot
@kbaig The hints suggested to make a function to check for argument numbers. I started out more simply like what you suggested, but it got more complex due to needing to check the argument on the makeAdder function. What you suggested is pretty much what is already there in terms of checking for argument length. I just am not sure why it isn't passing and why the test cases say addTogether(2)(3)... it is choking on both those where there is a function call with multiple arguments. I don't even know why they are suggesting that syntax.
Anders Nicolai Magnussen
@andersnicolaimagnussen
@pragya1248 Cool that you have build your first website, it can need some visual approves, but great achievement.
Try checking out bootstrap or CSS grid and flex box
Aditya
@ezioda004
@pragya1248 Its giving early 2000 vibe, css can be improved.
Daniel Feldman
@Feldbot
@pragya1248 Nice work! Some design suggestions that could make it more user-friendly:
  • It is hard to scan the content since the type is virtually all the same size. Try just using the browser defaults for heading levels (h1, h2, h3, etc.) to get an idea of how those create a flow on their own. You may have to look at your content to see how to arrange it by title, subtitle, etc. This will really help things pop and make it easy to scan to see what the page is about.
    • Perhaps look at some templates to get an idea of how to arrange content. Right now everything is 100% wide, which makes it hard to read and scan. If you divide these content areas into smaller width blocks it will be easier to read, and perhaps have a more interesting design.
    • Some of the type is hard to read since the background competes with the text. Maybe use some opacity on the images, or change text colors to be more legible.
Stephen James
@sjames1958gm
@Feldbot your makeAdder function does need to have the argument check.
But you need to call makeAdder with arguments[0] or with num1 as you have that as your first parameter
@Feldbot addTogether(2)(3) should result is addTogether returning a function closed over the value 2 ( basically, makeAdder(2)) then it will call that function with (3)
Daniel Feldman
@Feldbot
@sjames1958gm The makeAdder(x) function does run the numTest function with x passed in, which is the equivalent to the 3 in the makeAdder(3) function. So it does check over that. I wonder why they didn't have their test case say addTogether(2) since the rest of the function tests for (3). It is really confusing to say addTogether(2)(3).
Stephen James
@sjames1958gm
You need to call makeAdder with num1 not [3] or 3 - and that function shouild test for the value y not x in the case of
addTogether(2)(3) x is 2 and y is 3
Bjorn van de Peut
@bjorno43
@Feldbot Also, please use Codepen or Pastebin when posting large walls of code like that. It could be considdered spamming :)
Daniel Feldman
@Feldbot
@bjorno43 Thanks for the tip.
CamperBot
@camperbot
feldbot sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Daniel Feldman
@Feldbot
@sjames1958gm Not sure I understand your suggestion. The challenge mentioned checking all the arguments. I thought this meant not only the num1, num2 arguments, but also the argument passed in to make adder (this would be the third argument, x, equal to three 3). So the function I have set up to test checks for num1, and num2, and then lastly checks x as the third argument in the make adder function. So that one checks for what you are calling y or 3.
nsonhouse
@nsonhouse
Can any one help with filtering a background image?
Stephen James
@sjames1958gm
@Feldbot No the value passed to the function returned from makeAdder is not passed to addTogether.
addTogether(2)(3) is a call to addTogether with only (2)
the (3) is passed to the function returned from addTogether and that function would be in your case makeAdder(num1)

The result of addTogether(2) should be

function (y) {
   numTest(y);
   // if statement
   y + 2
}

The 2 coming from makeAdder(num1);

nsonhouse
@nsonhouse
Need help with filtering . Any takers?
Stephen James
@sjames1958gm
Not sure what you mean by filtering a background image?
nsonhouse
@nsonhouse
@sjames1958gm I am trying to filter the background image with a blur or an opacity. But when I apply the filter to the body in the css file, the image does not change.
@sjames1958gm The div with the text and buttons change, but not the background image.
Stephen James
@sjames1958gm
I think you can filter only foreground elements.
Kaz Baig
@kbaig
I just discovered that Wix uses React. For example: http://www.mayhemracemanagement.com/cactusclassic
Stephen James
@sjames1958gm
@kbaig interesting
Daniel Feldman
@Feldbot
@sjames1958gm Thanks for the help. Something is getting lost in translation on my part unfortunately. At this point I think it may be better to just look at the answers and see what is going on. I'm about 100 hours into the intermediate algorithms, so I'm not feeling tooooo bad about that ;-)
CamperBot
@camperbot
feldbot sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8899 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
@Feldbot This is a new concept where a function returns another function thus the (2)(3) syntax.
can I ask you a question? what is arguments.length in addTogether in this case addTogether(2)(3)?
Dylan Mayers
@DylanMayers
wondering if anyone can help me here, i'm trying to implement a navbar for a page i'm making and it isn't able to be viewed as a normal navbar, it's collapsed by default and i can't figure out how to correct it
Bjorn van de Peut
@bjorno43
@DylanMayers I would suggest that you make a Codepen out of it so others can review your code and see what's going on
Dylan Mayers
@DylanMayers
sure thing
Bjorn van de Peut
@bjorno43
@DylanMayers I think that pen is incomplete. The menu doesn't work at all there
Oh wait.. it does
It's just a very small button, lol
Dylan Mayers
@DylanMayers
it's a code along exercise but in the video the navbar was implemented as normal, so i'm confused as to why my bar is collapsed
i've tried copying the solution html and the result is the same
Daniel Feldman
@Feldbot
@sjames1958gm In the case you are mentioning, with that syntax, I'd say the argument's length is 1. There are two arguments, but each has it's own length of 1.
Stephen James
@sjames1958gm
@Feldbot length 1 is correct, there is only one argument being passed to addTogether the (2)
Bjorn van de Peut
@bjorno43
@DylanMayers This is the part that causes it: <div class="collapse navbar-collapse" You can change that to <div class="nav navbar-nav" and it will show by default. Though it will be out of place, undoubtly because of the design used.
@DylanMayers You might want to check this website: https://www.w3schools.com/bootstrap/bootstrap_navbar.asp It explains a couple of things about bootstrap navbars
Daniel Feldman
@Feldbot
@sjames1958gm My code is working, apparently, but it won't pass these tests:
addTogether(2)(3) should return 5. // If I call addTogether(2), it returns 5 but won't pass the test.
addTogether(2)([3]) should return undefined. // If I change the hard-coded value var add3 = makeAdder([3]); it returns undefined, but won't pass the test.
Dylan Mayers
@DylanMayers
@bjorno43 thanks for the help, i'll look into that link :)
CamperBot
@camperbot
dylanmayers sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 218 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Stephen James
@sjames1958gm
@Feldbot
addTogether(2)
This call to addTogether should return makeAdder(num1)
And your makeAdder should test y not x
the function returned by addTogether will get the values (3) and ([3]) in the parameter y which need to be checked
Bjorn van de Peut
@bjorno43
@Feldbot That's the wrong way to pass parameters to JS functions. For example
function example(parameter1, parameter2){
    var result = parameter1 + parameter2;
    return result;
}

var add = example(2, 3);

// Add = 5
Stephen James
@sjames1958gm
@bjorno43 This is a specific challenge that returns a function so addTogether(2)(3) is from the challenge.