Skip to main content

JavaScript Question 153

Question 153 of 0JavaScript

What should the value of `method` be to log `{ name: "Lydia", age: 22 }`?

Login Required

Please login to select answers and solve this question. You can view the question without logging in.

Code:
const keys = ["name", "age"]
const values = ["Lydia", 22]
const method = /* ?? */
Object[method](keys.map((_, i) => {
	return [keys[i], values[i]]
})) // { name: "Lydia", age: 22 }

Select the correct option: