Determine the output for each of the following when x is 9 and y is 11 and when x is 11 and y is 9. Note that the interpreter ignores the indentation in a JavaScript program. Also, the JavaScript interpreter always associates an else with the previous if unless told to do otherwise by the placement of braces ({}). Because, on first glance, the programmer may not be sure which if an else matches, this is referred to as the “dangling-else” problem. We have eliminated the indentation from the following code to make the problem more challenging. (Hint: Apply indentation conventions you have learned.)
a.
```
if ( x < 10 )
if ( y > 10 )
document.writeln( "*****
" );
else
document.writeln( "#####
" );
document.writeln( "$$$$$
" );
```
b.
```
if ( x < 10 ) {
if ( y > 10 )
document.writeln( "*****
" );
}
else {
document.writeln( "#####
" );
document.writeln( "$$$$$
" );
}
```
a.
x = 9 and y = 11.
x = 11 and y = 9.
b.
x = 9 and y = 11.
x = 11 and y = 9.
You might also like to view...
Match the following terms to their meanings:
I. Quick Launch II. Search Center III. Search verticals IV. SharePoint Online Ribbon V. Status bar A. Enables you to search the SharePoint sites you have permission to access B. Provides easy access to elements within the site C. Gives the user instant information in context D. Additional search pages that focus searches on people, conversations, or the current site E. A fixed-position toolbar
The color scheme in Office is called the Office ________
Fill in the blank(s) with correct word
RFI is a disturbance that can affect electrical circuits, devices, and cables due to electromagnetic conduction or radiation
Indicate whether the statement is true or false
In the case of ________ only the digital signature is encoded using base64.
A. enveloped data B. signed and enveloped data C. signed data D. clear-signed data