Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Mage = function (name = '') {
- [this.name, this.health, this.mana] = [name, 100, 100];
- this.cast = (spell = '') => {
- this.mana -= 1;
- console.log(`${this.name} cast ${spell}`);
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement