Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript arrow functions default parameter

const greeting = (name = "Anonymous") => "Hello " + name;

console.log(greeting("John"));
console.log(greeting());
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #arrow #functions #default #parameter
ADD COMMENT
Topic
Name
1+3 =