Many answers here declare a function to check for strict mode, but such a function will tell you nothing about the scope it was called from, only the scope in which it was declared!
function isStrict() { return !this; };
function test(){
'use strict';
console.log(isStrict()); // false
}
Same with cross-script-tag calls.
So whenever you need to check for strict mode, you need to write the entire check in that scope:
var isStrict = true;
eval("var isStrict = false");
Unlike the most upvoted answer, this check by Yaron works not only in the global scope.