gpt4 book ai didi

prototypejs - 如何在 prototype.js 中为哈希中的键设置多个值?

转载 作者:行者123 更新时间:2023-12-02 05:18:22 25 4
gpt4 key购买 nike

如何在 prototype.js 中为哈希中的键设置多个值?例如:

var hash={2005: [107, 31, 635, 203, 2]}

最佳答案

你可以像这样把你写的东西转换成哈希

var hash=$H({2005: [107, 31, 635, 203, 2]});

console.log(hash.get(2005));

//returns [107, 31, 635, 203, 2] as an array

关于prototypejs - 如何在 prototype.js 中为哈希中的键设置多个值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15756553/

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