console.log('caught key'+key); code example Example: how to print console in javascript console.log("message here")