loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Function with default parameter value
function plainEchoer(message="Hello World!") {
  console.log(message);
  return message;
}

plainEchoer();
plainEchoer("Hello there!");


// Arrow based expression with default parameter value 
let arrowEchoer = (message="Good day") => {console.log(message);return message};

arrowEchoer();
arrowEchoer("Good night");
Native Browser JavaScript