JavaScript/String:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第5行: 第5行:
{{leftrightflex|<syntaxhighlight lang="javascript">
{{leftrightflex|<syntaxhighlight lang="javascript">
String.raw`\u00A2`;</syntaxhighlight>|{{consoleout|<pre>'\\u00A2'
String.raw`\u00A2`;</syntaxhighlight>|{{consoleout|<pre>'\\u00A2'
</pre>}}}}
== 排序 ==
{{leftrightflex|<syntaxhighlight lang="javascript">
const equaldata = [
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/style/foo.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bar.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/common/qux.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/style/biz.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/fonts/DS-DIGI.ttf',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bg.png',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bg2.png'
].sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));</syntaxhighlight>|{{consoleout|<pre>
[
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bar.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bg.png',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/bg2.png',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/common/qux.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/fonts/DS-DIGI.ttf',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/style/biz.less',
  '/Users/kangjian/360/dora/td-deadfile/kk/kk-css-exporter/test/resource/style/foo.less'
]
</pre>}}}}
</pre>}}}}


== 面试题 ==
== 面试题 ==
[[/面试题|面试题]]
[[/面试题|面试题]]

2022年11月7日 (一) 10:51的版本

引言

转义

防止被转义。

模板:Leftrightflex

排序

模板:Leftrightflex

面试题

面试题