Skip to content

Instantly share code, notes, and snippets.

@ranamahmud
Created November 7, 2020 11:23
Show Gist options
  • Save ranamahmud/cf29d0980039872de045fc25a9e6c199 to your computer and use it in GitHub Desktop.
Save ranamahmud/cf29d0980039872de045fc25a9e6c199 to your computer and use it in GitHub Desktop.
let num3 = 100;
function total(num1, num2) {
let result = num1 + num2 + num3;
console.log("Result inside: " + result);
return result;
}
const output = total(13, 5);
// Result inside: 118
console.log(output);
// 118
// console.log(result); // this line will throw error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment