Without using prototypes or classes. const createEmployee = ({name, age}) => ({ name, age, work(){ console.log("is working") } })
I did not say without prototype
Idk why you'd want to use prototypes, what if you accidentally overwrite a important built in function lol
Обсуждают сегодня