Skip to content

Instantly share code, notes, and snippets.

@Ifycode
Created July 31, 2020 21:53
Show Gist options
  • Save Ifycode/80c0b8531247e7ce4d320c6bdb7576e2 to your computer and use it in GitHub Desktop.
Save Ifycode/80c0b8531247e7ce4d320c6bdb7576e2 to your computer and use it in GitHub Desktop.
Embed for Understanding Regular Function & Converting To Arrow Function Article index.js file - Js example 3
'use strict';
//Named function with parameters
function sameFunction(num3, num4) {
let displayBox = document.getElementById('displayBox');
displayBox.innerHTML = `${num3} + ${num4} = ${num3+num4}`;
}
sameFunction(3, 4);
//output: 3 + 4 = 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment