Menu
Coddy logo textTech

Basic Function

Lesson 6 of 14 in Coddy's Function Declarations in JavaScript course.

In JavaScript, functions are the building blocks of code organization and logic implementation.
There are several ways to declare functions, each with its own syntax and behavior. Let's explore them:

Basic Function Declaration:

This is the traditional way of declaring a function using the function keyword.

For example:

function basicFunction() {
	console.log("Basic Function");
}
challenge icon

Challenge

Easy

Write a function named doubleIt that takes one number as an argument and returns its double.

Try it yourself

// Write code here

All lessons in Function Declarations in JavaScript