Created
January 9, 2015 19:41
-
-
Save tazsingh/6ebfcab592fc3577680f to your computer and use it in GitHub Desktop.
JavaScript `print` vs `console.log`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> 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