Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

default in javascript

const greet = (message = 'Hello World!') => console.log(message);

greet(); // prints 'Hello World!'
greet('Hello! Does this answer your question?') // prints 'Hello! Does this answer your question?'
 
PREVIOUS NEXT
Tagged: #default #javascript
ADD COMMENT
Topic
Name
8+9 =