Created
June 17, 2016 21:46
-
-
Save JemiloII/7c51568f84796470bb9a1fa6a0dce179 to your computer and use it in GitHub Desktop.
What's the point of creating a null function and then overriding it?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//What's the point of creating a null function and then overriding it? | |
'use strict'; | |
function a () { | |
var result = {}; | |
result.__proto__.show = function () { | |
return null; | |
} | |
result.show = function (param) { | |
return foo(param); | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment