<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>异步 on 疯狂的技术宅</title><link>https://fe-tech.viewnode.com/tags/%E5%BC%82%E6%AD%A5/</link><description>Recent content in 异步 on 疯狂的技术宅</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Thu, 14 Jan 2021 10:00:00 +0800</lastBuildDate><atom:link href="https://fe-tech.viewnode.com/tags/%E5%BC%82%E6%AD%A5/index.xml" rel="self" type="application/rss+xml"/><item><title>如果await 同一个 Promise 两次会怎么样？</title><link>https://fe-tech.viewnode.com/post/202101/14/</link><pubDate>Thu, 14 Jan 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202101/14/</guid><description>先看下面这道面试题： let counter = 0; const increment = new Promise(resolve =&amp;gt; { counter++; resolve(); }); await increment; await increment; console.log(counter); // 结果是什么？ 你认为 counter 的值是什么？ 什么是 promise ？这是否意味着“稍后再做”？ 实际上应该把</description></item><item><title>关于 JavaScript 回调函数的所有知识</title><link>https://fe-tech.viewnode.com/post/202012/30/</link><pubDate>Wed, 30 Dec 2020 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202012/30/</guid><description>回调函数是每个前端程序员都应该知道的概念之一。回调可用于数组、计时器函数、promise、事件处理中。 本文将会解释回调函数的概念，同时帮你区</description></item><item><title>如何取消 JavaScript 中的异步任务</title><link>https://fe-tech.viewnode.com/post/202003/16/</link><pubDate>Mon, 16 Mar 2020 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202003/16/</guid><description>有时候执行异步任务可能是很困难的，尤其是在特定的编程语言不允许取消被错误启动或不再需要的操作时。幸运的是 JavaScript 提供了非常方便的功能来中止异步活动</description></item><item><title>在现代 JavaScript 中编写异步任务</title><link>https://fe-tech.viewnode.com/post/201910/30/</link><pubDate>Wed, 30 Oct 2019 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/201910/30/</guid><description>在现代 JavaScript 中编写异步任务 在本文中，我们将探讨过去异步执行的 JavaScript 的演变，以及它是怎样改变我们编写代码的方式的。我们将从最早的 Web 开发开始，一直到现代</description></item></channel></rss>