JavaScript Functions
<!DOCTYPE html> <html> <body> <h2>From regular function to arrow function</h2> <script> // Regular function expression const double1 = function (n) { return n * 2; }; // Same thing as an arrow function const double2 = (n) => { return n * 2; }; console.log(double1(4), double2(4)); // 8 8 </script> </body> </html>