Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save iamryanyu/dc3eb7d51c5f3385babacd2c7504aad8 to your computer and use it in GitHub Desktop.

Select an option

Save iamryanyu/dc3eb7d51c5f3385babacd2c7504aad8 to your computer and use it in GitHub Desktop.
call() apply() bind()
'use strict';
const javascript = {
language: 'js',
title: 'JavaScript Crash Course',
students: [],
enrol(studentId, name) {
this.students.push({
course: this.language,
id: studentId,
name,
});
},
};
const react = {
language: 'react',
title: 'React Crash Course',
students: [],
};
const enrol = javascript.enrol;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment