I have a small bit of code that is really giving me a headache. All it needs to do is get a location (in this case an array representing a longitude and latitude).
planner.js:
var plan = function (lawnmower, yard) {
var currentPos = lawnmower.position;
alert(currentLong);
lawnmower:
var longitude = homeLongitude, latitude = homeLatitude;
var getPosition = function() {
return [longitude, latitude];
};
that.position = getPosition;
When the alert gets called it returns getPosition after the equal sign.
Heres a pic
I'm fairly novice at JS.
invocation, which is represented by the().