Using console.log and alert

How to use console.log and alert