Maybe I am too quick in asking this question , but I was going through angular code and I found the logical expression evaluation like this : https://github.com/angular/angular.js/blob/master/src/ng/directive/attrs.js#L362
Essentially an attribute was evaluated like :
attr.$set(attrName, !!value);
Is there a particular reason why was this done this way ?