antville/code/Choice/objectFunctions.js

17 lines
No EOL
331 B
JavaScript

/**
* constructor function for choice objects
*/
function constructor(title) {
this.title = title;
this.createtime = this.modifytime = new Date();
return this;
}
/**
* function removes all votes from a choice
*/
function deleteAll() {
for (var i=this.size();i>0;i--)
this.get(i-1).remove();
return true;
}