Skip to content

Instantly share code, notes, and snippets.

View naveenrawat51's full-sized avatar
🏠
Working from home

naveenrawat51@gmail.com naveenrawat51

🏠
Working from home
View GitHub Profile
@naveenrawat51
naveenrawat51 / JavascriptNativeCallApplyBind.js
Last active June 21, 2019 13:35
call(), apply() and bind() Implementation in Javascript, Implementation of Native JavaScript Methods call(), apply() and bind() --- naveenrawat51@gmail.com
+++++++++++++++++ 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])