Introducing JavaScript Flashcards

1
Q

<p>Syntax</p>

A

<p>a programming language&#39;s commands, special words and punctuation</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

<p>What does &quot;syntax&quot; mean?</p>

A

<p>A Syntax is like the vocabulary and grammar of a programming language. It&#39;s a language&#39;s words and commands as well as the instructions for putting them together to create a program.</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

<p>T/F:&nbsp;You can use JavaScript on a web server.</p>

A

<p>True</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

<p>T/F:&nbsp;JavaScript is used to build complex web applications, like GMail, Google Docs, and Google Maps.</p>

A

<p>True</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

<p>T/F:&nbsp;JavaScript lets you add interactive components to a site like photo galleries, tabbed panels, or form validation.</p>

A

<p>True</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

<p>T/F:&nbsp;Java and JavaScript are the same thing.</p>

A

<p>False</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

<p>Statement</p>

A

<p>JavaScript sentence</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

<p>Add code&nbsp;to write the words &quot;Welcome to my site&quot; onto the web page.</p>

A

<p>document.write(&quot;Welcome to my site&quot;);</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

<p>Running or Executing the Program</p>

A

<p>when a browser follows the instructions in a program</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

<p>Complete the following code so that the message &quot;Program complete&quot; is written to the browser&#39;s JavaScript console:</p>

<p>console.\_\_\_\_\_(&quot;Program complete&quot;);</p>

A

<p>log</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

<p>What is one benefit of putting your JavaScript code just before the closing</body>&nbsp;tag on a web page?</p>

A

<p>Visitors will be able to see the contents of the web page BEFORE the JavaScript program runs.</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

<p>When a browser &quot;executes&quot; a JavaScript program, what is the browser doing?</p>

A

<p>The browser is reading and acting on the JavaScript programming. This is also called &quot;running&quot; the program.</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

<p>What JavaScript commands tells a browser to open a dialog box with a message?</p>

A

<p>alert();</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

<p>When adding JavaScript to a web page, where can you put your JavaScript code?</p>

A

<ul>
<li>in a separate file, that ends in .js</li>
<li>inside (script) tags placed in the (head) of a web page</li>
<li>inside (script) tags placed just before the closing (body) of a web page</li>
</ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

<p>Type the code required to print &#39;Begin program&#39; to the browser&#39;s JavaScript console.</p>

A

<p>console.log(&quot;Begin program&quot;);</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

<p>Finish the code below to load the JavaScript file app.js:&nbsp;<br></br>
<script &nbsp;\_\_\_\_\_></script></p>

A

<p>src=&quot;app.js&quot;</p>

17
Q

<p>Finish the code below to write the message &quot;I&#39;m a programmer!&quot; to the web page:</p>

<p>\_\_\_\_\_.\_\_\_\_\_(&quot;I&#39;m a programmer!&quot;);</p>

A

<p>document, write</p>

18
Q

<p>What do you use the JavaScript Console for?</p>

A

<ul>
<li>finding errors in a JavaScript program</li>
<li>sending hidden messages for you to see how your program is running</li>
</ul>

19
Q

<p>What is a &quot;syntax error&quot;?</p>

A

<p>a &quot;grammatical&quot; mistake like mistyping a JavaScript command or forgetting a closing parentheses or quote mark</p>