Skip to main content

Han

Member since May 18, 2010

Recent Blog Comments By Han

  • Javascript's IN Operator Does Not Work With Strings

    Posted on Jun 30, 2011 at 4:43 AM

    @Han, Damnit, typos, should be: Wait a minute... var str = new String( 'primitive-valued string literal' ); console.log( str.split(' ') ); //=> obviously ["primitive-valued", "string", "literal"] str.split = function(){ return 'overridden!'; }; console.log( st... read more »

  • Javascript's IN Operator Does Not Work With Strings

    Posted on Jun 30, 2011 at 4:37 AM

    I'm surprised no one else has explained this more clearly, though most of the pieces are scattered throughout the comments. I'm going to start by poking some holes in your tests, and also point out some JavaScript quirks you probably haven't noticed, which I hope will motivate my excruciatin... read more »

  • Javascript's Implicit Boolean Conversions

    Posted on Feb 11, 2011 at 3:40 AM

    @Victor: http://bclary.com/2004/11/07/#a-11 .9.3 Step 18 would be the culprit here.... read more »

  • Javascript's Implicit Boolean Conversions

    Posted on May 18, 2010 at 4:19 PM

    This is very clearly spelled out in the ECMAScript spec (section 9.2): http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262 ,%203rd%20edition,%20December%201999.pdf It's not as clear in the JScript spec, but this appears to be normalizing: http://msdn.microsoft.com/en-us/lib... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel