PDA

View Full Version : what's the meaning of "==="?



deardeer76
23 Feb 2009, 6:49 PM
In the following program, "===", what's the meaning of it? Is it right or wrong?
Thanks!

var tpl = new Ext.XTemplate(
'<p>Name: {name}</p>',
'<p>Company: {[values.company.toUpperCase() + ", " + values.title]}</p>',
'<p>Kids: ',
'<tpl for="kids">',
'<div class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
'{name}',
'</div>',
'</tpl></p>'
);
tpl.overwrite(panel.body, data);

evant
23 Feb 2009, 6:51 PM
http://www.webreference.com/js/column26/stricteq.html

mjlecomte
23 Feb 2009, 6:54 PM
Identically equal to. 1 == true, but 1 !== true. Enforces that the variable type is the same.

http://www.java2s.com/Tutorial/JavaScript/0040__Operators/IdenticallyEqualandNotIdenticallyEqual.htm