how to print out a function in js code example Example 1: js how to print console.log(text); Example 2: print in js console.log()