by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 20:09
    @krisb1220 banned @Gastony
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
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
Markus Kiili
@Masd925
@rylew0925 Post the code again.
Richard
@rylew0925

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();
Markus Kiili
@Masd925
@rylew0925 Your constructor still ends here:
var Bike = function() {

  // Only change code below this line.

};
Richard
@rylew0925
Oh duh
@Masd925 Thanks!
CamperBot
@camperbot
rylew0925 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4490 | @masd925 |http://www.freecodecamp.com/masd925
linkin-park
@linkin-park
@rylew0925 hi
Carlos Nah
@RA9
Hi
GabriRa
@GabriRa
I have never use node + react/express. How can i use the data I send with express .get()?
santhoshbalaguru001
@santhoshbalaguru001
i cannot able to add background image
heroiczero
@heroiczero
@santhoshbalaguru001 missing ; inbackground:url( "https://exp.cdn-hotels.com/hotels/1000000/20000/16200/16135/1c2a3bbe_z.jpg")
Pascal Clanget
@Gh05d
Anybody else really hated that Twitch.tv Viewer Project? Finally been able to finish it, but it was really a pain in the ass :angry: If anybody wants to check my solution out: https://codepen.io/Gh05d/full/gGaVBo/
heroiczero
@heroiczero
@Gh05d Well it looks good. Nice Job :+1:
Pascal Clanget
@Gh05d
@heroiczero thx :smile:
CamperBot
@camperbot
gh05d sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1749 | @heroiczero |http://www.freecodecamp.com/heroiczero
Elizabeth Paul
@Kowalatam
@Gh05d looks way better than mine :+1:
Long Nguyen
@longnt80
@Gh05d what do you hate about it?
Munkhmanlai
@munkhmanlai

[{"GOV":[
{
"date": "2014-01-01T16:00:00.000Z",
"value": 5800,
"volume": 1
},
{
"date": "2014-01-06T16:00:00.000Z",
"value": 5750,
"volume": 1
},
{
"date": "2014-01-07T16:00:00.000Z",
"value": 5375,
"volume": 56
},
{
"date": "2014-01-08T16:00:00.000Z",
"value": 5600,
"volume": 20
}
],{"MIK":[
{
"date": "2016-01-03T16:00:00.000Z",
"value": 12100,
"volume": 3056
},
{
"date": "2016-01-04T16:00:00.000Z",
"value": 12180,
"volume": 107
},
{
"date": "2016-01-05T16:00:00.000Z",
"value": 12200,
"volume": 1120
},
{
"date": "2016-01-06T16:00:00.000Z",
"value": 12200,
"volume": 2022
}
]}]

I have this JSON file and when you hit search button, it is supposed to search JSON file and "MIK","GOV" will be what is searched, those are company names and when MIK is written and hit search button it is supposed to display the latest price of MIK is there anyone can help me thanks

Pascal Clanget
@Gh05d
@longnt80 Mostly this fake twitch api that had to be used, because it made really complicated to fetch the data as I needed it and the restrictions from codepen.io. They prevented me from using import/export statements and so I had to use one single state, which was/is also really ugly.
santhoshbalaguru001
@santhoshbalaguru001
Long Nguyen
@longnt80
@Gh05d can you give more detail on how to use import/export statement?
For that project of course
Pascal Clanget
@Gh05d
@longnt80 Well, I wanted to define several components, each with their individual state and import them into my main file. On codepen, you can't can't do this, because you can only import via the settings of a project and - as far as I know - you can't export any components you've written in the same pen. Maybe this link is helpful: http://exploringjs.com/es6/ch_modules.html#sec_basics-of-es6-modules
santhoshbalaguru001
@santhoshbalaguru001
i created nav bar with background -color :black , its not showing
@Gh05d
@heroiczero
Long Nguyen
@longnt80
@Gh05d yeah I've used es6 modules in one of my project. So mostly it is for organizing your js, isn't it?
Pascal Clanget
@Gh05d
Yes, and for managing state. because every component can have it's own state and reacht it around via properties.
@santhoshbalaguru001 Your background image is overlaying it. The only quick fix I can think of now is giving pageone a margin-top: 100px;
Tunde Oretade
@tundeiness
hi guys i'm a bit confused about the usage of the wikipedia API...the sandbox is confusing can anyone help out?
Renan Teixeira Ferraz
@RTFerraz
Hi there
Renan Teixeira Ferraz
@RTFerraz
Do I have to use asynchrony in the Twitch.tv project?
korzo
@korzo
@RTFerraz sure. ajax calls are async by it's nature
Renan Teixeira Ferraz
@RTFerraz
@korzo It's working without ajax
I couldn't figure out how to use ajax in the project
korzo
@korzo
@RTFerraz you have to use callback.
It's function, which is called after ajax returns data from API
In callback you process the data and display them
Renan Teixeira Ferraz
@RTFerraz
but it's really confusing to use the data from more than one different http request
korzo
@korzo
@RTFerraz you need chain of callbacks
First callback pass data to second http request and callback from second callback you process final data and display them
Renan Teixeira Ferraz
@RTFerraz
Do you have some example?
korzo
@korzo
@RTFerraz
var step_3 = function() {
    c.finish();
};

var step_2 = function(c, b) {
    ajax(c(b.somedata), step_3);
};

var step_1 = function(b, a) {
  ajax(b(a.somedata), step_2);
};

ajax(a, step_1);