Tag: functions

Recent Post

How to exit a JavaScript function

A JavaScript function can be exited by using the 'return' keyword or throwing an error.

Adding a default parameter value to a function in JavaScript

A default parameter value is used if no argument is passed in when a function is called.

Understanding JavaScript closures with simple examples

A JavaScript closure is a function that has its own protected, 'private' variables.

Self-executing functions in JavaScript

Self-executing functions are ideal for making a one-time process self-contained.

All you need to know about JavaScript arrow functions

Arrow functions use efficient syntax but are best avoided when using "this"

What’s the difference between methods and functions?

Learn how methods are functions able to act upon the object in which they are stored.

Functions in JavaScript

How to write and call functions in Javascript.