What I want to do should be incredibly simple but I suppose I'm not understanding the basic concepts and causing me more confusion than I'd like to admit.
I want to pass a value into a function by "chaining" it instead of passing the value as an argument.
I want to be able to do this:
var formattedDate = myDate.convertTime()
Instead of:
var formattedDate = convertTime(myDate);
In my search I've come across many examples of how to use call functions inside objects, but they always start with declaring a new object and calling the function inside that object that simply updates predefined variables like age, name, or location as in new Obj(name, age)
which doesn't seem to be what I am looking for when applied to my situation. I'd really appreciate some guidance in the right direction.