1/9
Flashcards covering key concepts, facts, and details from the lecture notes on JavaScript.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is JavaScript primarily used for?
JavaScript is primarily used to make websites interactive and dynamic.
What are the three keywords used to declare variables in JavaScript?
var, let, const.
What is the difference between undefined and null in JavaScript?
Undefined means a variable has been declared but not assigned a value, while null is an intentional absence of any object value.
What are the main types of JavaScript data types?
String, Number, Boolean, Undefined, Null.
What is the purpose of console.log() in JavaScript?
console.log() is a built-in function that outputs the value inside the parentheses to the console.
What is an anonymous function in JavaScript?
An anonymous function is a function that does not have a name.
What is an arrow function in JavaScript?
Arrow functions provide a concise syntax for writing functions and are especially useful in callbacks.
How do you declare a constant in JavaScript?
You declare a constant using the const keyword.
What is a for loop typically used for in JavaScript?
A for loop is typically used when you know beforehand how many times you want to repeat a block of code.
What are the types of control statements in JavaScript?
Conditional Statements, Looping Statements, and Jump Statements.