const steven = {
name: 'steven',
phoneBattery: 70,
powerBank: function (level) {
this.phoneBattery += level
}
}
const becky = {
name: 'becky',
phoneBattery: 15,
reset: function () {
this.phoneBattery = 15
}
}
steven.powerBank(20)
console.log(steven.phoneBattery)
steven.powerBank.call(becky, 75)
console.log(becky.phoneBattery)
becky.reset()
steven.powerBank.apply(becky, [75])
console.log(becky.phoneBattery)
becky.reset()
const chargerBeckyPhone = steven.powerBank.bind(becky)
chargerBeckyPhone(75)
console.log(becky.phoneBattery)