Replacing 'alert' with 'console.log'