如何在 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/