How does JS make the internal this of the callback function point to undefined?

my goal is to make the this of the content of the callback function point to undefined, but it is not necessary when the call method is passed into null or undefined. The internal this of the callback function is still a window object. Please give me some advice.

in addition, if you can force the callback function to use strict mode. How to achieve it? Or can it be realized?


the following code

var f = function(){
  console.log(this);
}
f.call(undefined);

in strict mode:
output 'undefined'

in non-strict mode,
outputs global objects

In

strict mode, those pointing to global objects point to undefined.


after reading the comments, I don't understand what you mean.
strict mode defaults to undefined , as follows

  

strict mode defaults to undefined , and non-strict is a window object.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37bc0-2b605.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37bc0-2b605.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?