JavaScript Exam Notes
JavaScript Exam Notes
- Examples:
const pi = 3.14;
- Operators: Arithmetic (+, -, *, /), Comparison (==, ===, !=), Logical (&&, ||, !).
- Objects: Key-value pairs. Example: let person = {name: "John", age: 30}.
Calculator Functionality
- Example:
Fibonacci Series
- Fibonacci: Sequence where each number is the sum of the two preceding ones.
- Example:
function fibonacci(n) {
}
return fib;
Display in Ascending/Descending
- Example:
- Example:
- Example:
Functions in JavaScript
- Functions: Reusable blocks of code.