diff --git a/addition.js b/addition.js index 68ef33b..204aa50 100644 --- a/addition.js +++ b/addition.js @@ -1,3 +1,8 @@ let a = 20; let b = 30; -console.log("Sum = " , a+b); \ No newline at end of file +console.log("Sum = " , a+b); + +module.exports = { + c : 50, + d : 'XYZ' +} \ No newline at end of file diff --git a/import var from other file.js b/import var from other file.js new file mode 100644 index 0000000..564f61e --- /dev/null +++ b/import var from other file.js @@ -0,0 +1,5 @@ +const impo= require('./addition'); +console.log(impo); +console.log(impo.c); +console.log(impo.d); +