Skip to content

Commit 2a5291f

Browse files
committed
Make it clear in README that do_str returns stdout
All the examples in the readme use `print` but don't show what happens to that text. Passing the returned result to `console.log` makes it clearer that the text is returned.
1 parent 0672c9e commit 2a5291f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ import mp_js from 'micropython';
5757
(async () => {
5858
await mp_js;
5959
mp_js.init(64 * 1024);
60-
mp_js.do_str("print('hello world')\n");
60+
const stdout = await mp_js.do_str("print('hello world')\n");
61+
console.log(stdout);
6162
})();
6263
```
6364

0 commit comments

Comments
 (0)