In JavaScript, the this keyword refers to the object it belongs to. In the context of a function, this refers to the global object when the function is invoked as a free function, not as a method of an object.