Pure Javascript Functions Tutorial - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Pure Javascript Functions Tutorial (408 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
|
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
Visit Here For Online Mulesoft Certification Training By Experts • Is The Gig Economy In Moribund? • Am Looking For Next Js Typescript Developer With Langchain And Openai Experience