JS Flashcards
Give 6 examples of comparison operators.
!= , ====, == !==, < ,>
What data type do comparison expressions evaluate to?
Boolean
What is the purpose of an if statement?
Execute a condition if a statement exists
Is else required in order to use an if statement?
no
Describe the syntax (structure) of an if statement.
if () {}
What are the three logical operators?
&&, I I,!
How do you compare two different expressions in the same condition?
logical and non logical
Why do we log things to the console?
to check for errors to fix in the code
What is a method?
a method is a function which is a property of an object
How is a method different from any other function?
a method is a built it in task
How do you remove the last element from an array?
arra.pop()
How do you round a number down to the nearest integer?
Math.floor()
How do you generate a random number?
Math.Random
How do you delete an element from an array?
splice and pop
How do you append an element to an array?
.push