JavaScript 101 – A Detailed Guide on How to Use Object Destructuring

In web development, we can unpack values from object properties to make our code cleaner and easier to work with. We assign these values to distinct variables, which we can now use further along our programming logic. Example: To make this ‘unpacking’ easier ES6 introduced a new feature called destructuring assignment. With destructuring, we can …

Managing data across different scopes with the Superglobal Variables in PHP

Superglobals are special built-in variables in PHP that are available from any function, class, or file without a previous declaration of them as global variables. That practically means there is no need to use the global keyword to access them. Below is how we can access a common global variable from a function: Without the …

Var, let and const variables. How they differ and which one to use

JavaScript provides three methods for declaring variables. We can use the var, let, and const keywords. This abundance of choices is a source of confusion for a beginner developer. At least it was for me. While taking my first steps in the world of JavaScript. I wondered, “Why should a programming language use so many …

MVC Made Simple: The Framework Behind Countless Web Applications

MVC stands for Model-View-Controller, and it’s a way of structuring applications so they’re easier to understand, build, and maintain. A Brief History of MVC MVC isn’t new. It dates back to the 1970s, when a Norwegian computer scientist named Trygve Reenskaug introduced the concept while working at Xerox PARC. At the time, researchers were experimenting …

Converting data types in JavaScript with simple examples

JavaScript is a dynamically typed — also known as untyped — language. Typing is the process of defining the data type of a variable. In dynamically typed languages, typing is associated with the variable’s value and not the variable itself. Thus, in JavaScript, variables don’t need to specify a certain data type when they are …

Exploring Data Types in PHP with examples

In programming, we instruct computers to do things, and we call these instructions programs. We can write programs using different programming languages, the same way we can communicate with other humans using different human languages. Each language consists of rules that dictate how to use data, and each data has a type. The operations that …