Comments on method

# Added comment to all method
# Also made sure to use the correct ”console” by using window.console
instead of just console.