JavaScript Quiz 1
! && ||
! = NOT && = AND || = OR
What are the symbols for Arithmetic Operators
/ = Division + = Addition - = Subtraction * = Multiplication
What are the 7 types of Data types and explain each
1.) Boolean = True or False 2.) Number = a number 3.) String = Character sets 4.) Null = No value 5.) Undefined = no assignment 6.) Symbols = Wraps existing objects 7.) Object = used to create custom objects
What are the two ways data types can be converted and explain how each is done
1.) Implicit conversion - Done by interpreter as needed 2.)Explicit - Done by specific methods
What are the three steps in the Switch Statement
1.) Switch expression is evalutaed once 2.) The value of expressions is compared to value of each CASE 3.) If there is a match, the associated block of code is executed
Difference between == and ===
== - Equal === - Strict Equality
What are operations?
A single calculation using Operators and operands
What is a statement?
A single instruction
What does the break keyword do in a Switch Statement?
Beaks out of the switch block
What is white space?
Characters ignored by Script interpreter
What is the difference between code compilation and interpretation
Compilation = When code is evaluated and translated into one or more code Units Interpretation = When code is parsed statement by statement at run time
what is ECMAScript
European Computer Manufacturers Association standardized scripting specification = Synonymous with JavaScript
What is the difference between operators and operands
Operators = Symbol used to define operation Operands = Values applied
What is the difference between a property and a method
Property = the data members of a given object Methods = the functions that can be called for a given object
What is the difference between server-side and client-side scripting
Server = Scripting happens on server before client Client = Interpretation attempted by browser
What is a event
Something that triggers a function
What does *= do
Take variable on left and multiples it by right and assigns to itself
What is a resultant?
Value of a operation
What are Conditional Statements and give examples
When code is executed depending on situation ex. If and Switch
what is a constant?
a Read only variable
What is the DOM
a collection of standardized properties and methods
What is a object
a type of data storage unit that may contain a number of pieces of data or have built in functionality
What is a depose?
a variable to be deposed when released from memory
a method of the document object that will return an element based on the passed id
document.getElementById(id)
What is used to call properties and methods?
dot notation
What does the ++ do
either displays a number then adds one or adds one and displays a # depending on which side it goes on
What is code called that is chained to an else statement
else if
a property of the location object that returns the fully URL of the current page
location.href
returns true if the passed value currently holds a NaN (not a number) status
number.isNaN(value)
attempts to convert a string into either a float (decimal value) or integer (whole value)
number.parseFloat(string)
returns the checked value as a true or false for some HTML form objects specifically a checkbox or radio button
object.checked
can be used to both get and set values
object.innerHTML
the style property in turn has child properties of specific CSS style
object.style
can be used to get values in all cases and set in most
object.value
What is concatentation?
putting two strings together into one
What is the default statement used for?
runs if no match in switch
a method of the window object that will invoke a dialog box on screen
window.alert(text_string)