We can define methods in JavaScript objects by adding a property to the function with the same name as the method. For example, an emp function is defined that takes id, name, and salary parameters and assigns them as properties of the this context. A changeSalary method is also defined internally and assigned to the this context. An emp object is instantiated, and its changeSalary method is called to update the salary property.