Skip to content

Instantly share code, notes, and snippets.

@tazsingh
Created January 9, 2015 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tazsingh/6ebfcab592fc3577680f to your computer and use it in GitHub Desktop.
Save tazsingh/6ebfcab592fc3577680f to your computer and use it in GitHub Desktop.
JavaScript `print` vs `console.log`
$> d8
V8 version 3.25.30 [console: readline]
d8> typeof console
undefined
d8> typeof print
function
d8> print("hello world")
hello world
d8> console.log("hello world")
(d8):1: ReferenceError: console is not defined
console.log("hello world")
^
ReferenceError: console is not defined
at (d8):1:1
d8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment