The standalone V8 shell (d8
) does not come with a console
object, so I cannot do console.log
. How do I print stuff to stdout?
Use the print
function instead of console.log
. For instance:
$ cat test.js
print('foo');
$ ~/src/v8/out/native/d8 test.js
foo
Head over to Sandeep Datta's blog post for more info on d8
helper functions like print
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With