Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

naveenrawat51@gmail.com naveenrawat51

🏠
Working from home
View GitHub Profile
@naveenrawat51
naveenrawat51 / JavascriptNativeCallApplyBind.js
Last active Jun 21, 2019
call(), apply() and bind() Implementation in Javascript, Implementation of Native JavaScript Methods call(), apply() and bind() --- naveenrawat51@gmail.com
View JavascriptNativeCallApplyBind.js
+++++++++++++++++ call() Implementation +++++++++++++++++++++
Function.prototype.myCall = function(obj1){
let random = Math.random();
obj1[random] = this;
let args = [];
for( let i =1; i<arguments.length; i++ ){
args.push(arguments[i])
You can’t perform that action at this time.