Both of these statements do the same thing: they store a function in a variable called
log. Additionally, the
const keyword was used to declare the second function, which will prevent it from being overwritten.
obj.log can be simply reassigned to another function. Only
obj can't be re-declared, but its content still can.
Share this highlighthttp://www.safaribooksonline.com/a/learning-react/15373919/