Which of the following is a valid way to define a function as a property of an object?
obj.func = function() { ... }
obj.func = () => { ... }
Both
None of the above
This question is part of this quiz :