<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>this on 疯狂的技术宅</title><link>https://fe-tech.viewnode.com/tags/this/</link><description>Recent content in this on 疯狂的技术宅</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Fri, 19 Mar 2021 10:00:00 +0800</lastBuildDate><atom:link href="https://fe-tech.viewnode.com/tags/this/index.xml" rel="self" type="application/rss+xml"/><item><title>一个能够确定 this 值的算法</title><link>https://fe-tech.viewnode.com/post/202103/19/</link><pubDate>Fri, 19 Mar 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202103/19/</guid><description>每个 JavaScript 程序猿，包括我自己，都一直在努力了解 this 关键字在代码中的真正身份。 我设计了一个通用算法，可以帮你在任何情况下确定 this 关键字的值。虽然我尽可</description></item><item><title>这 7 道关于 this 的面试题，你能答对几个？</title><link>https://fe-tech.viewnode.com/post/202103/03/</link><pubDate>Wed, 03 Mar 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202103/03/</guid><description>在 JavaScript 中，this 是函数调用上下文。正是由于 this 的行为很复杂，所以在 JavaScript 面试中，总是会问到有关 this 的问题。 做好的准备面试的方法是练习，所以本文针对 this</description></item><item><title>用 globalThis 访问全局对象</title><link>https://fe-tech.viewnode.com/post/201912/04/</link><pubDate>Wed, 04 Dec 2019 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/201912/04/</guid><description>JavaScript 语言越来越被广泛地用于各种环境中。除了 Web 浏览器（这是 JavaScript 的最常见的宿主环境类型）之外，你还可以在服务器，智能手机甚至机器人硬件中运行 JavaScript 程序。</description></item><item><title>别在不知道临时死区的情况下使用 JavaScript 变量</title><link>https://fe-tech.viewnode.com/post/201910/15/</link><pubDate>Tue, 15 Oct 2019 11:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/201910/15/</guid><description>我问一个简单的问题。以下哪个代码片段将会产生错误？ 第一个创建实例，然后定义所用的类： new Car(&amp;#39;red&amp;#39;); // Does it work? class Car { constructor(color) { this.color = color; } } 第二个先调用然后定义函数</description></item><item><title>在 JavaScript 中轻松处理 “this”</title><link>https://fe-tech.viewnode.com/post/201910/14/</link><pubDate>Mon, 14 Oct 2019 11:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/201910/14/</guid><description>我喜欢 JavaScript 中能够更改函数执行上下文（也称为 this）的特性。 例如，你可以在类似数组的对象上使用数组方法： const reduce = Array.prototype.reduce; function sumArgs() { return reduce.call(arguments, (sum, value) =&amp;gt; { return sum += value; }); }</description></item></channel></rss>