diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/hello_module.js | 4 | ||||
-rw-r--r-- | examples/message.json | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/hello_module.js b/examples/hello_module.js index 463660f..5d4c78e 100644 --- a/examples/hello_module.js +++ b/examples/hello_module.js @@ -1,6 +1,8 @@ -/* example of JS module */ +/* example of JS and JSON modules */ import { fib } from "./fib_module.js"; +import msg from "./message.json"; console.log("Hello World"); console.log("fib(10)=", fib(10)); +console.log("msg=", msg); diff --git a/examples/message.json b/examples/message.json new file mode 100644 index 0000000..3b7fe48 --- /dev/null +++ b/examples/message.json @@ -0,0 +1,2 @@ +{ "x" : 1, "tab": [ 1, 2, 3 ] } + |