A cópia do código é a seguinte:
<! doctype html>
<html lang = "en">
<head>
<meta charset = "utf-8">
<title> Documento </title>
</head>
<Cript>
var stu = {
M: function () {
var self = this;
console.log (this === stu);
função f () {
// Isso não aponta para o contexto de chamar a função externa ao chamar a função aninhada
console.log (this === stu);
Se você deseja acessar isso em uma função externa, precisa salvá -lo em uma função externa em uma variável.
console.log (self === stu);
}
f ();
}
}
</script>
<Body>
</body>
</html>