My C# oriented braincells keep telling me that this should work:
var MyApp = function() {
currentTime = function() {
return new Date();
};
};
MyApp.currentTime();
Clearly it doesn't. But if a javascript function is an object, shouldn't I be able to call a function that is on the object? What am I missing?