// Javascript => is called Arrow Function: A short syntax for functions
hello1 = function(name) {
return "Hello " + name + "!";
} // can be replaced with arrow function. See below.
hello2 = (name) => { return "Hello " + name + "!"; } // Arrow Function =>
hello3 = (name) => "Hello " + name + "!"; // Even shorter =>
console.log(hello1("Alice"), hello2("Bob"), hello3("Ada"))
// " != " in Javasacript means : not equal.
//Normal function
function sum(a, b) {
return a + b;
}
//Arraw function
let sum = (a, b) => a + b;