JavaScript mengubah array menjadi peta

const arr = ['a', 'b', 'c', 2, 3, 4];
const nwMap = new Map([...arr.entries()]); 
Samuel Abusa Kennedy