diff --git a/js/add.js b/js/add.js new file mode 100644 index 0000000..c28a419 --- /dev/null +++ b/js/add.js @@ -0,0 +1,9 @@ + + + function add(x, y) { + return x + y; + console.log('add'); + } + + + \ No newline at end of file diff --git a/js/hello_world.js b/js/hello_world.js index 17ef608..7075136 100644 --- a/js/hello_world.js +++ b/js/hello_world.js @@ -1,10 +1,10 @@ function main() { console.log('Hello world!'); - console.log('a() ===', a()); + console.log('a() ===', bla(5,6)); } -function a() { - return 1 + 1; +function bla(x, y) { + return x * y; } if (require.main === module) { diff --git a/js/sub.js b/js/sub.js new file mode 100644 index 0000000..bdee2c6 --- /dev/null +++ b/js/sub.js @@ -0,0 +1,8 @@ + + + function sub(x, y) { + return x - y; + } + + + \ No newline at end of file