数组转对象 const fruits = ["banana", "apple", "orange", "watermelon"];const fruitsObj = { ...fruits };// {0: "banana", 1: "apple", 2: "orange", 3: "watermelon"}