変数をオブジェクト インデックスとして渡す方法を見つけようとしています。次に例を示します。
function createObject(index,value){
var data = {index:value};
console.log(data);
}
createObject('hello','world');
//result Object { index="world"} instead of Object { "hello"="world"}
これまでのところ、この特定の答えを見つけることができませんでした..
ありがとう!