where to console log code example Example 1: javascript log to console console.log('message1' + ' - ' + 'message2') Example 2: console.log console.log("");