I have two javascript objects that are used to replicate data objects. They are filled in via onclick events, and I want to clear them out after a save event.
For example,
var currentStrategy = {
id : "",
label : "",
dueDate : "",
comments = [],
save : saveStrategyHandler,
clear : function() {
//how do I clear the fields above in here?
}
}
I've tried
function(){
id = "";
label = "";
dueDate = "";
comments = [];
}
and
function(){
currentStrategy = {};
}
but neither work.