This is the very first line of a JavaScript file I am modifying and and what does it do? jQuery is also used in the file.
var w = w || {};
From what I know the || is a logical operator this is a quote from the Mozilla documentation. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Logical_OR
Logical operators are typically used with Boolean (logical) values. When they are, they return a Boolean value. However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value.