

After I dug into it further, it wasn't surprising that while they are totally different it was very informative to understand how it can affect code architecture. This is the difference between a function declaration and an anonymous function expression.Īt first I remembered this concept and syntax back while in college but never have had chance to use it.
So when I was reviewing some code it was quite unusual for me to see the function definition as “ var = function()”. As a developer, I typically define a function using the syntax functionJavaScript is also relatively intuitive and straightforward to learn. Well-known examples of JavaScript content include fillable forms, photo gallery slideshows, and animated graphics.


There seems to be some confusion out there about how to define a JavaScript function, so in today's blog I'll review the different options and ways you can define JavaScript functions.Īs a developer, I typically define a function using the syntax function “ ()”. What Is JavaScript Most simply put, JavaScript is a popular scripting language for adding interactive functionality and other dynamic web content to web pages. It is used to load and execute modules in a Node.js application. Recently, I was streamlining some JavaScript code for one of our clients SharePoint and Dynamics CRM integrations, and I came across some legacy code that took me back to my college coding class days. The require function is a global function that is provided by the Node.js runtime environment.
