JSFiddle - React, Tailwind, and code Playground
JavaScript
function A() {
return function(){
console.log('something');
return new B();
}
}
function B() {
}
var no_new = A();
var with_new = new A();
alert(no_new);
alert(with_new);
var are_they_same = (no_new === with_new);
alert(are_they_same);