What is a Return Value? (Easily Explained with Examples!)

A side effect is what happens when a function shows a dialog box or writes text on the screen of your computer. By definition, a side effect is something that changes the way a machine works and potentially affects what comes after it. On the other hand, a function can also produce values that don’t … Read more

What is the Console.Log Function?

console.log is a function that writes out its arguments to a device. It’s a special binding expression that takes in the log properties from values held by the console binding. For example, if you were to use console.log in a browser, the output would be on the JavaScript console. You can access the JavaScript console … Read more

What Are Functions in JavaScript? (Easy To Understand!)

When you start up an environment (like turning on a computer or opening up a program), the values you find in that environment have the type function. What is a function? A function is: a portion of a program wrapped in a value performs a single task and you can call that function whenever you … Read more

What Does an Environment Mean in JavaScript? (SUPER Simple Explanation!)

An environment is a collection of: bindings and their values that exist at any given time. Starting up a program creates an active environment Environments at the start of a program are surprisingly not empty. In fact, these environments start with bindings that are standard to the JavaScript language. Like when you turn on a … Read more

Rules for Creating Binding Names in JavaScript (EVERYONE Should Know!)

When you’re making binding names, you can make up almost anything. You can even have digits inside a binding name like iamlegend23. However, a few rules you must abide by when coming up with a binding name: The binding name must not start with a digit. The only symbol or special character you can include … Read more

What Are Expressions and Statements in JavaScript?

What is an expression in JavaScript? An expression is a fragment of code that produces a value. For example, you got literal values like 43 or “happy.” These are always expressions! Expressions are also considered something in between parentheses. Binary and unary operators that hold 2 expression values or 1 are also fully considered expressions … Read more

What is Short-Circuiting of Logical Operators?

The logical operators (&& and ||) will convert their left-hand value to a Boolean type. It then decides what to return. It can either return the original left-hand value or the right-hand value. The or operator (||) will return the left value if it’s converted to true and it will return the value on the … Read more

How to Test If a Value is a Real Value in JavaScript

Whenever you want to see if a value is actually real instead of just undefined or null, you can use undefined or null to compare it. You can use either the equal to operator (==) and the not equal to operator (!=) for the test. So thanks to JavaScript’s automatic conversions work like this: or … Read more