Editor Arrow Download Open
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JavaScript Arrow function (Find maximum value)</title> </head> <body> <pre> <!-- Use pre element for work document.writeln() method --> <script type="text/javascript"> var max = (x, y) => (x > y) ? x : y; // returns, undefined var ans = max(15, 24); // returns, 24 document.writeln("Maximum value: " + ans); </script> </pre> </body> </html>
  Preview Arrow