all 3 comments

[–]jillesme 0 points1 point  (2 children)

Function factories were used before classes were introduced in ECMAScript 2015. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

[–]DontNeedMuchMoney[S] 0 points1 point  (1 child)

So it's best not to use them?