Q:

Comparison Variables

I saw some variables like this:
var comparison = <condition> || /* It could be "&&" too */ <condition>;

I don't know what it is and what can it do?
Tks you so much!

A:

It's mainly used to initialize function arguments to a certain default value. 
function foo(arg1,arg2)
{
    arg1 = arg1 || 'Default for arg1';
    arg2 = arg2 || 'Default for arg2';
}

What this code does, is actually the same as the following:
if (!(arg1))
{//if arg1 is falsy
    arg1 = 'Default for arg1';//assign
}

As far as the && goes, that's pretty much the same story:
function foo(arg1,arg2)
{
    var areBothArgsTrue  = arg1 && arg2;//sets true is both args were truthy, else assigns false
    arg1 = arg1 || 'Default for arg1';
    arg2 = arg2 || 'Default for arg2';
}

A:

They're called logical operators (MDN):

expr1 && expr2 : Returns expr1 if it can be converted to false; otherwise, returns expr2. Thus, when used with Boolean values, && returns true if both operands are true; otherwise, returns false.
expr1 || expr2 : Returns expr1 if it can be converted to true; otherwise, returns expr2. Thus, when used with Boolean values, || returns true if either operand is true; if both are false, returns false.

