While browsing through some code, I stumbled upon this snippet and found myself puzzled by the not:
. Is it a tag of some sort? And if so, are there alternative applications for it?
var foo = {
not: function(bool) { return !bool; }
}
I'm curious to know about potential scenarios where this syntax might be useful. Any insights you can provide would be appreciated.