Skip to content

Commit

Permalink
Update new.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari authored Nov 14, 2016
1 parent 1c0e3f7 commit ecec184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion function/new.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `new` agnostic

Even your function is called or not using `new` keyword, you can force to have the same behavior in both cases:
You can force an `Object` constructor to return an instance of the `Object` even when the `new` keyword hasn't been used:

```js
function User (name, passwordHash) {
Expand Down

0 comments on commit ecec184

Please sign in to comment.