Open isalexlog opened 3 years ago
Please do the tasks in the separate js files in js-oop directory
js-oop
TASK 1 - filename airplane.js (if you think this task is too easy for you, go for TASK 2)
airplane.js
name
isFlying
.takeOff()
.land()
TASK 2 - filename person.js
person.js
age
stomach
.eat("someFood")
eat
.poop()
.toString()
TASK 3 - adding allergens to person
please take a look at the last commit
Please do the tasks in the separate js files in
js-oop
directoryTASK 1 - filename
airplane.js
(if you think this task is too easy for you, go for TASK 2)name
from an argument.isFlying
of false..takeOff()
and.land()
:isFlying
property is set to true.isFlying
property is set to false.TASK 2 - filename
person.js
name
andage
from arguments.stomach
array..eat("someFood")
:stomach
.eat
method should have no effect if there are 10 items in thestomach
..poop()
:stomach
should empty..toString()
:name
andage
. Example: "Mary, 50"TASK 3 - adding allergens to person