You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the default arguments or one ? to check a variable, is compiled into == or !=, not === or !==
eg:
"use strict"product= (title="product") ->
title
item= (title) ->if title?console.log"title is not null"unless title?title="item"elsetitle.replace/\s+/, '-'
title
results:
// Generated by CoffeeScript 1.4.0(function(){"use strict";varitem,product;product=function(title){if(title==null){title="product";}returntitle;};item=function(title){if(title!=null){console.log("title is not null");}if(title==null){title="item";}else{title.replace(/\s+/,'-');}returntitle;};}).call(this);
"Because the == operator frequently causes undesirable coercion, is intransitive, and has a different meaning than in other languages" - http://coffeescript.org/#operators
The text was updated successfully, but these errors were encountered:
When I use the default arguments or one
?
to check a variable, is compiled into==
or!=
, not===
or!==
eg:
results:
"Because the == operator frequently causes undesirable coercion, is intransitive, and has a different meaning than in other languages" - http://coffeescript.org/#operators
The text was updated successfully, but these errors were encountered: