klasses = ['last'] && txt = '' if idx == (tabs.length - 1)
At the end of this statement klasses will contain "".
klasses = ['last'] and txt = '' if idx == (tabs.length - 1)
At the end of this statement klasses will contain ['last'] which was what I intended. But the first statement wasn't returning that.
A good explanation is here http://stackoverflow.com/questions/1426826/difference-between-and-and-in-ruby
1 comment:
河水永遠是相同的,可是每一剎那又都是新的。..................................................
Post a Comment