I'm new to ES6 Javascript which means i'm exploring it. I like the arrow function and default parameter feature from ES6 which is mentioned in the below site.
http://es6-features.org/#ExpressionBodies
http://es6-features.org/#DefaultParameterValues
Below is my code snippet of ES6 and i have tested this in Chrome 47
. I'm trying to give default parameter value for my arrow function which is currently throwing error like
<script type="text/javascript">
'use strict';
var greet = (name = 'Venkat') => (console.log('Hi ' + name + '!'));
greet(); // expected output: Venkat
greet('Venkatraman'); // expected output: Venkatraman
</script>
Let me know whether its possible, if so, explain with solution and what i'm doing wrong here.