Functions
- ES3
- ES5
- ES6
function sum(a, b) {
return a + b
}
console.log(sum(5,6)) // 11
var sum = function(a, b) {
return a + b
}
console.log(sum(5,6)) // 11
const sum = (a, b) => a + b
console.log(sum(5,6)) // 11
function sum(a, b) {
return a + b
}
console.log(sum(5,6)) // 11
var sum = function(a, b) {
return a + b
}
console.log(sum(5,6)) // 11
const sum = (a, b) => a + b
console.log(sum(5,6)) // 11