I'm learning js and I've come across an example in which || is used when declaring a var as a function:
var Triangulation = Triangulation || (function() {
...
It seems to me that this is checking to see if the var has already been declared before assigning it. Looking around the web, I don't see any other examples where this approach is used. What would be a reason to take this approach vs:
var Triangulation = function() {
...
Thanks