From 38e47b8704815f903c0b382890283067114dccc7 Mon Sep 17 00:00:00 2001 From: Anto Christopher Date: Fri, 25 Oct 2024 12:53:24 +0530 Subject: [PATCH] cross file test --- index.js | 5 ++++- server.js | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index de6dae1a..60611195 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,7 @@ -function isEven(x) { +const add = require("./server"); +add(1,2) + +function isEven(x) { if ((x = 2 || x % 2 == 0)) { console.log(`${x} is even`); } else console.log(`${x} is odd`); diff --git a/server.js b/server.js index 2e00d0f7..f866c610 100644 --- a/server.js +++ b/server.js @@ -23,3 +23,12 @@ request('http://www.google.com', function (error, response, body) { app.get('/', function (req, res) { res.send('hello') }); + +/** + * @deprecated + */ +function add(a, b) { + return a + b; +} + +module.exports = add;