Say that I want to set a bunch of variables equal to null (and don't want to use an array/loop structure) or maybe I just want to write a large boolean expression across multiple lines. Does an unclosed parenthetical prevent semicolon insertion in such a case? E.g.
some_variable = another_variable = yet_another_variable = (
oh_look_a_parenthesis_above_me = hey_heres_another_variable) = (
and_for_some_reason_another = last_one) = null;
Or
if(test_for_some_complex_expr && another_test || (
but_maybe_this_one && or_this_one)) {
// ...
}
And how does this compare versus using &&
or ||
or =
to group expressions over line breaks? I.e., would this always work too?
some_variable = another_variable =
a_variable_after_a_line_break = and_one_more;
while(test_for_an_expr && another_test ||
(an_expr_here && and_an_expr_here)) {
// ...
}
I'm looking for the way that is most standard across all browsers (including IE6+).