javaScript call apply and bind | call, apply and bind method in JavaScript

Publicado em: 07 Janeiro 2022
no canal de: Azhar Techno Coder
99
36

Code :

//call method

var employeeOne = {
name : 'Test1',
sno : 1
};

function printEmployee(designation,technology){
console.log("The employee name is "+this.name+" his sno is :"+this.sno+" his designation is : "+designation+", technology is "+technology)
}

printEmployee.call(employeeOne,"Developer","Java")

var employeeTwo = {
name : 'Test2',
sno : 2
}

printEmployee.call(employeeTwo,"Tester","Javascript")

//apply
printEmployee.apply(employeeTwo,["Tester","Javascript"])

//bind

var employeeOneDetails = printEmployee.bind(employeeOne)

console.log(employeeOneDetails)
employeeOneDetails("Tester","Javascript")




Next Steps :

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists

► 1. Javascript -    • Javascript Factory  
► 2. Puppetter -    • Puppeteer  
► 3. Cypress -    • Cypress  
► 4. Tech works -    • Video  
► 5. Vbscript Basics To Advanced -    • VBScript Part 1 -  Features Advantages Dis...  
► 6. Jmeter -    • Jmeter Tutorials  
► 7. Excel -    • Videos On Excel  
► 8. Appium -    • Appium  
► 9. Shares -    • Shares  
► 10. Javascript Interview Questions -   • Javascript Interview Questions  
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------

#call
#bind
#apply


Nesta página do site você pode assistir ao vídeo on-line javaScript call apply and bind | call, apply and bind method in JavaScript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Azhar Techno Coder 07 Janeiro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 99 vezes e gostou 36 espectadores. Boa visualização!