forked from codacy-acme/sample-javascript-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
37 lines (28 loc) · 857 Bytes
/
Copy pathmain.js
File metadata and controls
37 lines (28 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// This is the main JavaScript file of your sample project.
// Import the utility functions from util.js
const { add, subtract } = require('./util');
// Function to add two numbers
function addNumbers(a, b) {
return add(a, b);
}
// Function to subtract two numbers
function subtractNumbers(a, b) {
return subtract(a, b);
}
// Removed the unused variable
// const unusedVariable = 'This variable is not used';
// Removed the missing semicolon
const missingSemicolon = 'This line is missing a semicolon';
// Removed the undefined variable usage
// console.log(undefinedVariable);
// Removed the attempt to reassign a constant
// const constantValue = 42;
// constantValue = 43;
// Removed the missing function argument
// function missingArgument(arg1, arg2) {
// return arg1 + arg2;
// }
module.exports = {
addNumbers,
subtractNumbers,
};