Skip to content

Instantly share code, notes, and snippets.

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