Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Arrow Functions

// The usual way of writing function
const magic = function() {
  return new Date();
};

// Arrow function syntax is used to rewrite the function
const magic = () => {
  return new Date();
};
//or
const magic = () => new Date();

Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Arrow #Functions
ADD COMMENT
Topic
Name
1+8 =