These are chat archives for dcsan/gitterbot

2nd
Nov 2015
YI JIANG
@meet999
Nov 02 2015 06:39

var Car = function() {
// this is a private variable
var gear = 1;
// this is a private function (also known as a private method)
function addStyle(styleMe){
return 'The Current Gear Is: ' + styleMe;
}
// this is a public method
this.getGear = function() {
return addStyle(this.gear);
};

};

var Bike = function() {

// Only change code below this line.
this.getSpeed() =
speed = 100;

function addUnit(value) {
return value + "KM/H";
}

getSpeed = function () {
return addUnit(speed);
};

};

// Only change code above this line.

var myCar = new Car();

var myBike = new Bike();

if(myBike.hasOwnProperty('getSpeed')){(function() {return JSON.stringify(myBike.getSpeed());})();}

how to do this The method getSpeed of myBike should be accessible outside the object.?
I cant fiture it out
Abhisek Pattnaik
@abhisekp
Nov 02 2015 06:40
@meet999 don't troll here. I've every justification and power to ban you from here!
CamperBot
@camperbot
Nov 02 2015 06:40
:trollface: troll problems? notify admins here
Abhisek Pattnaik
@abhisekp
Nov 02 2015 06:40
@BerkeleyTrue
Berkeley Martinez
@BerkeleyTrue
Nov 02 2015 06:41
@meet999 This is not the place to seek help.
Abhisek Pattnaik
@abhisekp
Nov 02 2015 07:34
about @abhisekp
CamperBot
@camperbot
Nov 02 2015 07:34
api offline
Abhisek Pattnaik
@abhisekp
Nov 02 2015 07:34
@BerkeleyTrue the bot is unable to access the FCC API. Says API is offline. :point_up: November 2, 2015 1:04 PM
Berkeley Martinez
@BerkeleyTrue
Nov 02 2015 07:35
about @abhisekp
CamperBot
@camperbot
Nov 02 2015 07:35
you need to ask about @someone!
Berkeley Martinez
@BerkeleyTrue
Nov 02 2015 07:35
about @abhisekp
CamperBot
@camperbot
Nov 02 2015 07:35
api offline
Berkeley Martinez
@BerkeleyTrue
Nov 02 2015 07:35
WAT
Abhisek Pattnaik
@abhisekp
Nov 02 2015 07:35
about @BerkeleyTrue
CamperBot
@camperbot
Nov 02 2015 07:35
api offline
Dieter Daems
@DDaems
Nov 02 2015 07:36
hehe it diedidid :P