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
Coy Sanders
@coymeetsworld
or that could be it too
Doreen Lu
@ThoughtProvoking
OK. I'll try that.
Thanks
Marcus Rogers
@marcusrogers23
can anyone help with java?
fefo360
@fefo360
What do you guys use for responsive text ? Em rem or ..?
Toni Shortsleeve
@KoniKodes
@fefo360 I like to use 'em'. It seems to give me more control because I can calculate based on the set px. And, I'm not very familiar with rem.
Gegiskhan
@gegiskhan
hello guys. can i have a help on React.js here?
Toni Shortsleeve
@KoniKodes
Sorry @gegiskhan . I'm in the baby stages of React myself.
Ben Hart
@Benjmhart
Hey there, just coming back to a project on the wikipedia API after a long hiatus
I think I'm having some trouble with function scope would someone be able to help me out?
iso
@iso1048
@Benjmhart i will try and help
Ben Hart
@Benjmhart
basically i can't seem to call my wikiSearch function from the console
and my event handler for the enter keystroke keeps coming back as undefined too
sorry, there's a lot broken, I just came back to the project after quitting months ago
Ruchika Sharma
@ruchika90
@Manish-Giri got it centered, ty!
CamperBot
@camperbot
ruchika90 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6552 | @manish-giri |http://www.freecodecamp.com/manish-giri
iso
@iso1048

@Benjmhart

$("#searchBox").keypress(function(e,searchTerm){ if (event.keyCode == 13) {
        e.preventDefault();
        searchTerm = document.getElementById('searchBox').value;
  console.log(searchTerm);

  searchTerm = encodeURI(searchTerm);
  wikiSearch(searchTerm);
};

so you forgot to pass the event-handler (e) into the function. You previously had # when getting the element by Id, so that needed to be removed. Not sure if you need the encodeURI..

(by the way, I am no expert)
Ben Hart
@Benjmhart
I'm sure I had a good reason in my brain months ago
iso
@iso1048
@Benjmhart so in your ajax call url, if you request jsonp instead of json, you will see the json in the console - the parameters you are using are not what I used. give me a sec
yeah so i had action=opensearch in my url
Ben Hart
@Benjmhart
yeah i was looking at stack overflow and someone was saying query was a better choice.
oh ok then
Ben Hart
@Benjmhart
I'm getting the object on ready.
I just can't call the wikisearch function from the console.
and the object has an error, but I think that's because it only is running a blank search term
which i can't test because I can't call the function from the console
arugh
ok, so there's a problem with how I'm passing my search term
iso
@iso1048
i've never called a function from the console so can't help you there sorry
Ben Hart
@Benjmhart
@gothamknight - isn't that what the first like 100 exercises are? it's basically a console
fefo360
@fefo360
@KoniKodes thanks
CamperBot
@camperbot
fefo360 sends brownie points to @konikodes :sparkles: :thumbsup: :sparkles:
:cookie: 398 | @konikodes |http://www.freecodecamp.com/konikodes
iso
@iso1048
@Benjmhart typing myFunction() into the console gives me an error
Ben Hart
@Benjmhart
is it a not defined error?
iso
@iso1048
yep
Ben Hart
@Benjmhart
yeah thats what I got... oh well I'll try some more tomorrow
have a good one, thanks for your time
iso
@iso1048
no problem
Richard
@rylew0925
I am stuck on the "Make Object Properties Private" lesson
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function() {

  // Only change code below this line.

};
var gear;

this.setGear = function(x) {
  gear = x;
};
this.getGear = function() {
  return gear;
};

var myCar = new Car();

var myBike = new Bike();
Not sure what I did wrong
Markus Kiili
@Masd925
@rylew0925 The code you wrote needs to be inside the constructor function. Not after it.
Richard
@rylew0925
So I move the closing bracket to the very bottom?
Markus Kiili
@Masd925
@rylew0925 Move it before the myCar and myBike lines.
Richard
@rylew0925
I didn't work