Introducing JavaScript Flashcards
<p>Syntax</p>
<p>a programming language's commands, special words and punctuation</p>
<p>What does "syntax" mean?</p>
<p>A Syntax is like the vocabulary and grammar of a programming language. It's a language's words and commands as well as the instructions for putting them together to create a program.</p>
<p>T/F: You can use JavaScript on a web server.</p>
<p>True</p>
<p>T/F: JavaScript is used to build complex web applications, like GMail, Google Docs, and Google Maps.</p>
<p>True</p>
<p>T/F: JavaScript lets you add interactive components to a site like photo galleries, tabbed panels, or form validation.</p>
<p>True</p>
<p>T/F: Java and JavaScript are the same thing.</p>
<p>False</p>
<p>Statement</p>
<p>JavaScript sentence</p>
<p>Add code to write the words "Welcome to my site" onto the web page.</p>
<p>document.write("Welcome to my site");</p>
<p>Running or Executing the Program</p>
<p>when a browser follows the instructions in a program</p>
<p>Complete the following code so that the message "Program complete" is written to the browser's JavaScript console:</p>
<p>console.\_\_\_\_\_("Program complete");</p>
<p>log</p>
<p>What is one benefit of putting your JavaScript code just before the closing</body> tag on a web page?</p>
<p>Visitors will be able to see the contents of the web page BEFORE the JavaScript program runs.</p>
<p>When a browser "executes" a JavaScript program, what is the browser doing?</p>
<p>The browser is reading and acting on the JavaScript programming. This is also called "running" the program.</p>
<p>What JavaScript commands tells a browser to open a dialog box with a message?</p>
<p>alert();</p>
<p>When adding JavaScript to a web page, where can you put your JavaScript code?</p>
<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>
<p>Type the code required to print 'Begin program' to the browser's JavaScript console.</p>
<p>console.log("Begin program");</p>