<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Array on 疯狂的技术宅</title><link>https://fe-tech.viewnode.com/tags/array/</link><description>Recent content in Array on 疯狂的技术宅</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 22 Feb 2021 10:00:00 +0800</lastBuildDate><atom:link href="https://fe-tech.viewnode.com/tags/array/index.xml" rel="self" type="application/rss+xml"/><item><title>array.sort() 的这些坑你踩过没有</title><link>https://fe-tech.viewnode.com/post/202102/22/</link><pubDate>Mon, 22 Feb 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202102/22/</guid><description>在 JavaScript 中可以用 array.sort() 对数组进行排序。下面用它来对一些数字进行排序： const numbers = [10, 5, 11]; numbers.sort(); // =&amp;gt; [10, 11, 5] 呃。。。 numbers.sort() 的返回值居然是 [10，11，5]，这是怎么回事</description></item><item><title>如何在JavaScript中克隆数组？</title><link>https://fe-tech.viewnode.com/post/202102/17/</link><pubDate>Wed, 17 Feb 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202102/17/</guid><description>JavaScript 提供了很多克隆数组的方法，其中大多数在性能和结果方面都非常相似。以下就是这些方法的简要介绍。 展开运算符 ES6 引入了展开运算符（...），它可能</description></item><item><title>如何在JavaScript中清空数组？</title><link>https://fe-tech.viewnode.com/post/202102/11/</link><pubDate>Thu, 11 Feb 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202102/11/</guid><description>在使用 JavaScript 数组时，一个很常见的问题是如何清空数组并删除其所有元素。有几种方法可以解决这个问题，每种方法都各有利弊。 将其分配给一个空数组 你可以通</description></item><item><title>数组将要新增的方法：array.at(index)</title><link>https://fe-tech.viewnode.com/post/202101/19/</link><pubDate>Tue, 19 Jan 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202101/19/</guid><description>除了普通对象之外，数组是 JavaScript 中使用最广泛的数据结构。数组上最常使用的操作是按索引访问元素。 本文介绍新的数组方法 array.at（index）。</description></item><item><title>聊聊 Array 中的一个小坑</title><link>https://fe-tech.viewnode.com/post/2018/1227/</link><pubDate>Thu, 27 Dec 2018 11:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/2018/1227/</guid><description>Array 类型检测 function foo(obj) { // … } 假设obj是一个数组，我们想要实现一些功能。比如 JSON.stringify就是一个例子，它以不同的方式把数组输出到其</description></item></channel></rss>