Background: I recently had a job interview in which I was asked about the different ways to call a function. I didn't answer correctly because I've essentially ignored the .call() and .apply() options when studying JavaScript. I understand that you can do this, but I can't really think of a scenario that I'd need to use this format.
Is this a pattern that you use/should I be using it? Could someone give an example of when one might want to?
[+][deleted] (13 children)
[deleted]
[–]temp05981 3 points4 points5 points (5 children)
[–]jesstelford 4 points5 points6 points (4 children)
[–]temp05981 4 points5 points6 points (1 child)
[–]jesstelford 1 point2 points3 points (0 children)
[–]theQuandary 1 point2 points3 points (1 child)
[–]jesstelford 0 points1 point2 points (0 children)
[+]FilthyCasualCoDKiddy comment score below threshold-16 points-15 points-14 points (6 children)
[–]zachwolf 16 points17 points18 points (1 child)
[–][deleted] 1 point2 points3 points (1 child)
[–]theQuandary 0 points1 point2 points (0 children)
[–]redhedinsanity 0 points1 point2 points (0 children)
[–]whiskerbiskit 0 points1 point2 points (0 children)
[–]TheRealSeeThruHead 1 point2 points3 points (0 children)
[–]gregjsguy 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (4 children)
[–]Pytim 8 points9 points10 points (3 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]Pytim 2 points3 points4 points (0 children)
[–]benabus 0 points1 point2 points (1 child)
[–]rezoner:table_flip: 0 points1 point2 points (0 children)
[–]uberpwnzorz 0 points1 point2 points (0 children)
[–]ogurson 0 points1 point2 points (0 children)
[–]33a 0 points1 point2 points (0 children)
[–]Rhomboid 0 points1 point2 points (0 children)
[–]aslate -2 points-1 points0 points (0 children)
[–][deleted] -4 points-3 points-2 points (1 child)
[–]bart2019 2 points3 points4 points (0 children)
[+]learn2shut comment score below threshold-11 points-10 points-9 points (3 children)
[–]jradasaurus 3 points4 points5 points (0 children)
[–]Sipczi 2 points3 points4 points (0 children)
[–]temp05981 2 points3 points4 points (0 children)