ecmascript-5
ECMAScript Associative Array via Object w/ prototype null?
I see a lot of people doing this Object.prototype.foo = \'HALLO\'; var hash = {baz: \'quuz\'}; for ( var v in hash ) {[详细]
2023-03-09 02:30 分类:问答When will v8 implement ECMAScript 5?
I noticed that v8 is rather mute on the issue of ECMAScript 5th edition. V8 implements ECMAScript as specified in ECMA-262, 3rd edition, and runs on Windows XP and Vista, Mac OS X 10.5 (Leopard), an[详细]
2023-03-08 15:41 分类:问答variable.Property = "test" vs Object.defineProperty(variable,"Property")
If I want to give a variable a a property P (non-accessor property) and I do not care if it\'s configurable/enumerable/writable.[详细]
2023-03-08 14:15 分类:问答Make a simple search algorithm more elegant
// temp data var array = [1,2,function() { }, 3, function() { }]; var cb = function() { console.log(\"foo\"); }[详细]
2023-03-06 19:58 分类:问答JavaScript: Testing variables for undefined value; testing whether object is array
Is there a difference between typeof value === \"undefined开发者_高级运维\" and value === undefined?[详细]
2023-03-06 12:03 分类:问答JavaScript: Strict mode and anonymous functions
Nearly all my JS files are wrapped in anonymous functions. If I include \"use strict\"; outside the anonymous f开发者_开发知识库unction, is strict mode still applied to the anonymous function?[详细]
2023-03-06 02:13 分类:问答Is there anyway to have instances share the same function yet at the same time have private variables?
I have this piece of code: var Human=function(name){ this._name=name; }; Human.prototype.Shout=function(){[详细]
2023-03-06 01:09 分类:问答Javascript get and set availability in browsers
Which browsers do not support t开发者_Go百科he get and set methods for object prototypes? I believe this is a feature of ES5, an I know it works in Chrome, but I am wondering if it is safe to use for[详细]
2023-03-05 22:45 分类:问答why do we use `Boy.prototype = new Human;` to simulate inheritance?
i don\'t get why everyone i开发者_运维百科s using Boy.prototype = new Human; to simulate inheritance. Look, what we want is the function\'s of A right? we can do that without instantiating a new A (in[详细]
2023-03-05 10:37 分类:问答any higher-level language that writes out javascript?
I\'m looking for a higher-level language that writes out javascript. in other words the relation of this language to javascript is similar to the relation C++ have with assembly code.[详细]
2023-03-05 10:31 分类:问答