30.
Which method allows explicit object coercion in JavaScript?
toPrimitive()
convertTo()
forceObject()
coerce()
Correct: A
The toPrimitive() method in JavaScript allows for explicit object coercion. It is a method that can be implemented by objects to specify how they should be converted to a primitive value. When an object is forced to be coerced explicitly using the toPrimitive() method, the object itself has control over the conversion process and can return the desired converted value based on its own logic. This method gives developers more control over customizing object coercion behavior in JavaScript.