Given the array below:
const Array = ['Michael', 'student', 'John', 'cop', 'Julia', 'actress']
How can I transform it into an object like this?
const Object = {
Michael: student,
John: cop,
Julia: actress,
}
Is there a way to assign even index elements as keys and odd index elements as values in the resulting object?