Hi, guys please check the comment in my code to check why the javascript functions are First Class 🙂

// function statement\nfunction greet() {\n  console.log('hi');\n}\ngreet();\n\n// functions are first-class\nfunction logGreeting(fn) {\n  fn();\n}\nlogGreeting(greet);\n\n// function expression\nvar greetMe = function() {\n  console.log('Hi Tony!');\n}\ngreetMe();\n\n// it's first-class\nlogGreeting(greetMe);\n\n// use a function expression to create a function on the fly\nlogGreeting(function() {\n  console.log('Hello Tony!');\n});

Happy Coding 🙂