JSFiddle - React, Tailwind, and code Playground
by MasterAlex
JavaScript
var arr= ['one', 'two', 'three'];
var res = {};
$.each(arr,function(idx,el){
idx+=1
res[idx] = el;
})
console.log(res);
by MasterAlex
var arr= ['one', 'two', 'three'];
var res = {};
$.each(arr,function(idx,el){
idx+=1
res[idx] = el;
})
console.log(res);