为什么波斯语不添加一个数字?
我在Java脚本中有一个非常奇怪的问题。 查看这些代码并运行该应用程序:
const number = 200000;
const persianMoney = "تومان";
//pay attention to these lines:
console.log("way 1:");
console.log(number + persianMoney);
console.log(persianMoney + number);
console.log("way 2:");
console.log(`${number}${persianMoney}`);
console.log(`${persianMoney}${number}`);
console.log("way 3:");
console.log(String(number) + persianMoney);
console.log(persianMoney + String(number));
console.log("way 4:");
console.log(`${String(number)}${persianMoney}`);
console.log(`${persianMoney}${String(number)}`);
console.log("way 5:");
console.log(String(number + persianMoney));
console.log(String(persianMoney + number));
所有输出都是相同的!所有输出均为200000码}
!但是,为什么在某些输出中200000
不在200000
后面Word word
?即使在这里,我也不能在
200000
后面放置}تم>!但是为什么这样呢?我听不懂。我以5种方式测试了串联,但它们都不正确!我该如何解决这个问题?感谢您的帮助。
i have a really strange problem in java script.
look at these codes and run the app:
const number = 200000;
const persianMoney = "تومان";
//pay attention to these lines:
console.log("way 1:");
console.log(number + persianMoney);
console.log(persianMoney + number);
console.log("way 2:");
console.log(`${number}${persianMoney}`);
console.log(`${persianMoney}${number}`);
console.log("way 3:");
console.log(String(number) + persianMoney);
console.log(persianMoney + String(number));
console.log("way 4:");
console.log(`${String(number)}${persianMoney}`);
console.log(`${persianMoney}${String(number)}`);
console.log("way 5:");
console.log(String(number + persianMoney));
console.log(String(persianMoney + number));
all of the outputs are the same!! all of the outputs are 200000تومان
! but why word تومان
is not behind 200000
in some outputs? even here, i cant put تومان
behind 200000
! but why it is like that? i cant understand it. i tested concatenation in 5 ways but none of them were correct! how can i solve this problem? thanks for helping.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如 raymand chen 。我的理解是,您希望在数字200000之后拥有货币名称码。将阿拉伯语/波斯语单词保持在与拉丁语IE相同的方向上,沿从左到右的LTR方向。
一种可能的方法是添加LTR代码
\ U200E
As stated by Raymand Chen. My understanding is that you want to have the currency name تومان after the number 200000. To keep the Arabic/Persian word in the same direction as the Latin word i.e. in a Left-To-Right LTR direction.
One possible way to do that is to add the LTR code
\u200E