how to write strings and objects in the console.log in js code example Example: javascript log to console const varName = 'this variable'; console.log(varName);