Console.log with standalone V8 (d8)

The separate V8 ( d8) shell has no object console, so I cannot do it console.log. How to print material in standard mode?

+4
source share
1 answer

Use printinstead console.log. For example:

$ cat test.js
print('foo');
$ ~/src/v8/out/native/d8 test.js
foo

Go to the Sandeep Datta blog post for more information on helper features d8such as print.

+9
source

Source: https://habr.com/ru/post/1530848/


All Articles