JSFiddle - React, Tailwind, and code Playground
by Stas Orekhovskiy
JavaScript
console.clear();
var coffeMachine = new CoffeMachine(100);
var coffeMachine2 = new CoffeMachine(100);
var coffeMachine3 = new CoffeMachine(100);
var coffeMachine4 = new CoffeMachine(100);
coffeMachine.waterAmount = 200;
coffeMachine2.waterAmount = 2000;
console.log(coffeMachine);
console.log(coffeMachine2);
/* console.log(typeof CoffeMachine);
console.log(CoffeMachine instanceof CoffeMachine);
console.log(CoffeMachine instanceof Object);
console.log(CoffeMachine instanceof Function); */
function CoffeMachine(_power) {
this.waterAmount = 0;
//console.log("Create new object");
function geBoiTime(){
return 1000;
}
function onReady(){
console.log('coffe is ready');
}
this.run = function(){
.setTimeout(onReady, geBoiTime)
}
}