Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add sum #17

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "javascript-calculator",
"version": "1.0.0",
"description": "From zero to FullStack - an unofficial course led by [Pedro Soares](https://github.com/pncsoares) with the aim of guiding and helping two friends to learn programming and become software developers.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/from-zero-to-fullstack/javascript-calculator.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/from-zero-to-fullstack/javascript-calculator/issues"
},
"homepage": "https://github.com/from-zero-to-fullstack/javascript-calculator#readme"
}
11 changes: 11 additions & 0 deletions src/sum-two-numbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

// to store input numbers
const num1 = 5;
const num2 = 10;

function sum(num1, num2) {
return num1 + num2;
}

const x = sum(num1, num2);
console.log(x);