Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd76e07 commit 60482cbCopy full SHA for 60482cb
function-patterns/memoization.html
@@ -43,6 +43,11 @@
43
44
// preferred method 2
45
// multiple arguments using JSON stringify
46
+
47
+ // this will only work correctly for primitive (and Array) arguments,
48
+ // since the order in which properties of Objects are enumerated is undetermined
49
+ // and can even change between enumerations.
50
+ // (a JSON encoder that sorts the keys won't have this issue).
51
52
var myFunc = function () {
53
var cachekey = JSON.stringify(Array.prototype.slice.call(arguments)),
0 commit comments