Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Human::Baby by Mom & Dad
- class Baby extends Human {
- constructor (args) {
- super (args)
- }
- async eat (...food) {
- return this.stomach = await Promise.all(food.map (async (i) => await this.process(i)));
- }
- async pop () {
- return Promise.all (async () => {
- return this.stomach.forEach(async (food) {
- throw { food }
- })
- })
- }
- async sleep () {
- return await this.awake ();
- }
- }
Add Comment
Please, Sign In to add comment