Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

heads up that a code sample should have !==

$
0
0
a headsup for the code sample, that the !== should be there, but there is a typo:


var project = new can.Observe({
  progress :  0.5
});
var percentage = can.compute(function(newVal){
  // are we setting?
  if(newVal !=== undefined){
    project.attr("progress", newVal / 100)
  } else {
    return project.attr("progress") * 100;
  }
})


Viewing all articles
Browse latest Browse all 3491

Trending Articles