From d946e8a5870e683487ecebb3f9fb044922285280 Mon Sep 17 00:00:00 2001 From: Deadcoin <87581554+Livedollar@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:09:08 -0500 Subject: [PATCH] Create ES6-arrow-functions This is the missing exercise Sum - ES6 arrow functions. --- exercises/ES6-arrow-functions | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 exercises/ES6-arrow-functions diff --git a/exercises/ES6-arrow-functions b/exercises/ES6-arrow-functions new file mode 100644 index 0000000..4e9be5f --- /dev/null +++ b/exercises/ES6-arrow-functions @@ -0,0 +1,30 @@ +/* + TODO: Write a function that sums two numbers + TODO: Write a function that subtracts two numbers + TODO: Write a function that divides two numbers. + TODO: Write a function that multiplies two numbers. + *NOTE* be sure to handle dividing by zero 😉 + ES5 Syntax: function Add(){} + ES6 Syntax (Arrow function): const add = () => {} +*/ + +function add() { + //Add function here +} + +function sub(a, b) + //Subtract function here +} + +function div() { + //Divide function here +} + +function mul() { + //Multiply function here +} + +console.log('hello from the SUM exercise') +/* + TODO: create a function that console logs the result of any of the above operations. +*/