javascript console print variable code example Example 1: print console variable name javascript console.log({ }) Example 2: print javascript variable in console console.log(p);