Tag: functions

Recent Post

How to create a function that accepts an unknown number of arguments in JavaScript

Avoid specifying manually the number of arguments that a function will accept.

Store and Retrieve a Function in localStorage

Pass a function through localStorage using the Function constructor object.

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.