console.log javascript a variable code example Example: print javascript variable in console console.log(p);