Skip to content

Instantly share code, notes, and snippets.

@chrisblakely01
Created April 1, 2019 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisblakely01/ac1c3a590562f56de55dd9fb7f3c482d to your computer and use it in GitHub Desktop.
Save chrisblakely01/ac1c3a590562f56de55dd9fb7f3c482d to your computer and use it in GitHub Desktop.
function addNumbers(number1, number2)
{
const result = number1 + number2;
const output = 'The result is ' + result;
console.log(output);
}
// this function substracts 2 numbers
function substractNumbers(number1, number2){
//store the result in a variable called result
const result = number1 - number2;
const output = 'The result is ' + result;
console.log(output);
}
function doStuffWithNumbers(number1, number2){
const result = number1 * number2;
const output = 'The result is ' + result;
console.log(output);
}
function divideNumbers(x, y){
const result = number1 * number2;
const output = 'The result is ' + result;
console.log(output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment