Skip to content

Commit 79511cc

Browse files
feat: add function declaration
1 parent e2d229b commit 79511cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
INFO: What is Function Declaration ?
3+
A function declaration (also called a "function statement") is one of the most common ways to define a function in javascript. It creates a named function using the function keyword.
4+
*/
5+
6+
// Syntax
7+
function functionName() {
8+
console.log("hi");
9+
}
10+
11+
// Example
12+
function greet(name) {
13+
console.log(`Hello ${name}!`);
14+
}
15+
greet("Rafay");

0 commit comments

Comments
 (0)