Skip to content

Instantly share code, notes, and snippets.

@JemiloII
Created June 17, 2016 21:46
Show Gist options
  • Save JemiloII/7c51568f84796470bb9a1fa6a0dce179 to your computer and use it in GitHub Desktop.
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?
//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