Replace alert with console.log