While methods are just functions that are attached to objects, there is a difference in the way you use them with respect to side effects. With a function you do not want it to have any side effects on anything unless the specific purpose of the function is the side effect. With methods it is acceptable to have side effects provided that those side effects are contained within the object to which the method belongs.
The most obvious examples of methods with side effects are setters. These methods have the specific purpose of setting the value of properties of the same object. This type of side effect is an obvious extension to the idea of restricting function side effects to those functions where the specific purpose of the function is the side effect. You have somewhat more flexibility with methods though because we can look on the method as being just a part of the object and so any changes that the method makes that are contained within the object and which do not extend beyond the object need not be considered to be side effects at all.
By creating objects where values need to be able to be set by a function and retained for later use (and so allowing us to make that function a method of the object rather than a stand alone function) we can eliminate many of the stand alone functions which we would otherwise require to have side effects in their processing.
While making your functions into methods of a relevant object (rather than defining them separately and thus making them properties of the window object) does not eliminate side effects, it does keep the side effects to a minimum and relates them more closely to the specific data they belong to.