gpt4 book ai didi

javascript - 在 vscode 中使用表情符号编码

转载 作者:行者123 更新时间:2023-11-30 14:07:38 25 4
gpt4 key购买 nike

VSCode 在使用表情符号作为变量时出现错误。

prob1

prob3

以下是使用字母变量。

probl2

我正在尝试使用表情符号进行编码并从表情符号中获取智能感知。现在还支持吗?

最佳答案

基于 https://mothereff.in/js-variables , 不允许使用表情符号。

来自 https://mathiasbynens.be/notes/javascript-identifiers

What is allowed in an identifier name?

An identifier must start with $, _, or any character in the Unicode categories “Uppercase letter (Lu)”, “Lowercase letter (Ll)”, “Titlecase letter (Lt)”, “Modifier letter (Lm)”, “Other letter (Lo)”, or “Letter number (Nl)”.

The rest of the string can contain the same characters, plus any U+200C zero width non-joiner characters, U+200D zero width joiner characters, and characters in the Unicode categories “Non-spacing mark (Mn)”, “Spacing combining mark (Mc)”, “Decimal digit number (Nd)”, or “Connector punctuation (Pc)”.

关于javascript - 在 vscode 中使用表情符号编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55094339/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com