const actio = { 1:['nv','n'], 2:['nam','m'], default:['t','t'] } function on(type){ const a = actio[type] console.log('on(1)',a) } on(1)