₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,225 members, 8,510,773 topics. Date: Saturday, 31 October 2026 at 02:57 AM

Toggle theme

Pure Javascript Functions Tutorial - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Pure Javascript Functions Tutorial (433 Views)

1 Reply

Pure Javascript Functions Tutorial by EfevwiaEfemena(op): 4:03am On Aug 23, 2022
JavaScript functions are the fundamental building blocks. A function is basically a set of statement that performs a task or calculate a value. We are going to focus on:
i. Inputs
ii. Arguments

An example of a JavaScript function is:
function greet ( ) {
}
Note: what is inside the curly braces is referred to as the body of this function. In the body of this JavaScript function, this is where you add all the statements to define some kind of logic in our application.

For example, the logic of the JavaScript function will be to display a message on the console which is:
function greet ( ) {
console.log (‘Hello World’);
}

NOTE: Here we have a statement, so we terminated it with a semicolon, but when declaring a function, we don’t need to add a semicolon at the end. This is because we are not declaring it like a variable like this: To continue reading just type webbikon technologies on search engine and you see my website then click blog and you will see my article

1 Reply

A Simple Quiz App: No Framework! Just Pure Javascript • Let's Build A Loan Calculator Using Pure Javascript 2019 • A Thread For Tutorial On Python Programming • 2 • 3 • 4

Top Android Native App Development Company For Business Growth - Appstudio • Native App Development • Why Choose Qilksense Training In Chennai