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