<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>sort on 疯狂的技术宅</title><link>https://fe-tech.viewnode.com/tags/sort/</link><description>Recent content in sort 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/sort/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></channel></rss>