typeof null

Rick Waldron waldron.rick at gmail.com
Tue May 8 10:00:29 PDT 2012


On Tue, May 8, 2012 at 12:42 PM, Wes Garland <wes at page.ca> wrote:

> It looks to me like this code would work just fine by removing the word
> 'typeof'. What am I missing?
>
>
Sure, but that wasn't the point, I was simple trying to create an example
piece of code that would trigger the "opt-in"

Rick


>
> On 8 May 2012 12:19, Rick Waldron <waldron.rick at gmail.com> wrote:
>
>>
>> module Foo {
>>   export function create( options ) {
>>
>>     if ( typeof options === "null" ) {
>>       return ... some default thing;
>>     }
>>   };
>> }
>>
>> import create from Foo;
>>
>> let default = create( null );
>>
>> --
> Wesley W. Garland
> Director, Product Development
> PageMail, Inc.
> +1 613 542 2787 x 102
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120508/55ec4239/attachment.html>


More information about the es-discuss mailing list