2 ms·
> var editor = new Behave({ > var editor = Behave({ Is it a constructor or not?
by tantalor 14y ago
> var editor = new Behave({
> var editor = Behave({
Is it a constructor or not?
- tantalor 14y agoOn further inspection, it must be a constructor. The second case is incorrect. The function assigns to "this", which would be undefined in strict mode, or the global object. Very bad either way. Remember kids: objects are your friend.
- state 14y agoI wish it could be var editor = now Behave({
- jeffmess 14y agovar editor = oh Behave({
- jakiestfu 14y agoThank you good sir. It is a constructor, I've fixed the sites