i'm currently learning Jasmine. One of the examples in the intro (http://ift.tt/1vhJfTg), for Included Matchers,
show the following code:
it("The 'toBeTruthy' matcher is for boolean casting testing", function() {
var a, foo = "foo";
expect(foo).toBeTruthy();
expect(a).not.toBeTruthy();
});
What does
var a, foo = "foo";
mean?
Is it two definition of variables, a and foo and initializing them as a "foo" string?
a = false and foo = true? Because maybe they were predefined as:
var a = null;
var foo = "foo";
thanks
Aucun commentaire:
Enregistrer un commentaire