Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const now = new Date();
- class Item {
- constructor(options = {}) {
- this._id = options.id;
- this._date = now.toDateString();
- this._timestamp = now.getTime();
- this.description = options.description;
- this.isStarred = options.isStarred || false;
- this.boards = options.boards || [];
- }
- }
- const Item = require('./item');//this would be equivalent to <script src='item.js'></script>
- class Task extends Item {
- constructor(options = {}) { // const task = new Task({id, description, boards, priority});
- super(options);
- this._isTask = true;
- this.isComplete = options.isComplete || false;
- this.isStarred = options.isStarred || false;
- this.priority = options.priority || 1;
- }
- }
Add Comment
Please, Sign In to add comment