Quiz: Basic Syntax
Try this self-check quiz to test your knowledge!
What characters are used to denote a line ending in JavaScript?
What are two ways to add JavaScript to an HTML file?
What is the command used to declare a constant variable?
varletconstconst is used to declare a constant variable.What two attributes are used to let the browser know it can continue processing HTML and downloading resources while a JavaScript file loads?
laterdefernoblockasyncasync and defer attributes allow the browser to continue rendering the page while external JavaScript files are loaded.Which of these is a valid JavaScript comment?
<!-- comment goes here -->// comment goes here"""comment goes here"""::comment goes here//.Which operator gives you the remainder from dividing two operands?
++%**//% operator denotes the remainder operation.Which two operators are used to increment and decrement values by 1 in JavaScript?
++--&+&-++ and -- operators are used to increment and decrement the value of a variable by 1.Which command is used to define a "local" variable in JavaScript?
varconstletlocallet command is used to declare a local variable.Visit Quiz Online
The quiz on this page has been removed from your PDF or ebook format. You may take the quiz by visiting this book online.