• what is the reason to use the bitwise OR (|) for the length

    It's actually a performance thing...

    Encountering this 0 | ... I removed the 0 | and first noticed a performance decrease timing 1K invocations... but later I felt not seeing it aymore and that's why I asked. The explanation makes it obvious... may be for compiled one should be able to provide type information for variables... to help the compiler a bit more... may be in the form of jsDoc... For running uncompiled it will (for sure) slow down the process... except something has changed in the upload to remove comments within a stament / function / object

    var /*{String}*/ s = "Abc";
    var /*{int}*/ len = s./*{int}*/length; // (or s/*{int}*/.length;
    

    Similar approach for function signatures incl. return type.

About

Avatar for allObjects @allObjects started