how .call() method works in javascript code example
Example 1: javscript call
myFunc.call(thisArg, ...args)
Example 2: how do i call a js method?
<button onclick="sayHello()">say hello</button> <script> 'use strict'; //force the context to be undefined function sayHello() { console.log(this); console.log(arguments); console.log('hello'); } </script>