I'm trying to use the arrow-constructor to create an object:
var Countable = (data) => {
return data;
}
But when creating an object:
new Countable(newSubscriptions)
I get the error
Uncaught TypeError: (data) => {
return data;
} is not a constructor
I get the expected output by doing
var Countable = function(data) {
return data;
}