In short, Callback is a function that is passed to another function.

Also, view this tutorial on my YouTube Channel:

Callback functions exist everywhere in JavaScript. I’m pretty sure you have seen one of them around already.

// the 2nd argument of the addEventListener() function accepts a callback function…

You’ve got a lot of files and nested files in a directory. However loading them 1 by 1 using require is simply too painful. Life is already tough, so please don’t do that to yourself.

In this tutorial, I will show you a few ways to achieve this.

Option 1: Using the infamous PHP iterator classes

PHP is…

Laravel provides a nice and convenient API for us to define our app routes. There are 2 ways to define a route group: the array syntax via group() or the method syntax. Personally I love the array syntax by calling the group() method provided by the Route facade. …

JSON is the de-factor choice of transmitting data across the internet in the modern day. Its easy-to-read nature is pleasing for both human and computer.

When we are sending API requests we usually use JSON formatted string as our request payload. However, it has its flaws when it comes to…

Sam Ngu

Web Development. . Follow me on Youtube:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store