chore(curriculum): rm videos from math object, numbers booleans lectures (#61605)

This commit is contained in:
Karthik Bagavathy
2025-07-30 03:59:17 -05:00
committed by GitHub
parent 86b027d375
commit b64360dc6c
13 changed files with 19 additions and 110 deletions

View File

@@ -1,20 +1,13 @@
---
id: 673271c7581a27d9dd78f6d6
title: What Are Booleans, and How Do They Work with Equality and Inequality Operators?
challengeType: 11
videoId: PmbDO3GXcO4
challengeType: 19
dashedName: what-are-booleans-and-how-do-they-work-with-equality-and-inequality-operators
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are booleans, and how do they work with equality and inequality operators?
In an earlier lecture video, you were first introduced to the concept of booleans, but in this video, we will dive deeper into how booleans work and how the equality and inequality operators work.
In an earlier lecture, you were first introduced to the concept of booleans, but in this lecture, we will dive deeper into how booleans work and how the equality and inequality operators work.
Booleans are a data type with only `true` and `false` values. They're useful because they allow you to do something based on some conditions. Booleans are essential when you want to evaluate whether something should happen or not, like deciding if someone can access a certain feature in your app. Here is an example of setting the value `true` to a variable called `isOldEnoughToDrive`:
@@ -38,7 +31,7 @@ if (isOldEnoughToDrive) {
A conditional helps you make decisions in your code based on a condition. This example uses what is called an `if/else` statement.
If `isOldEnoughToDrive` is `true`, then the sentence `You're old enough to drive` will be logged to the console. Otherwise, if the `isOldEnoughToDrive` is `false`, then the sentence `Sorry, you are not old enough to drive` will be logged to the console. Since the `isOldEnoughToDrive` variable is set to `true`, the first sentence will be logged to the console. You will learn more about `if/else` statements in a future lecture video.
If `isOldEnoughToDrive` is `true`, then the sentence `You're old enough to drive` will be logged to the console. Otherwise, if the `isOldEnoughToDrive` is `false`, then the sentence `Sorry, you are not old enough to drive` will be logged to the console. Since the `isOldEnoughToDrive` variable is set to `true`, the first sentence will be logged to the console. You will learn more about `if/else` statements in a future lecture.
To compare two values, you can use either the equality or strict equality operator. The result of the comparison will be a boolean of either `true` or `false`. Here is an example of using the equality operator to compare a string and a number. The equality operator is represented by a double equals sign (`==`).

View File

@@ -1,19 +1,12 @@
---
id: 673271dffbc34fda31da9515
title: What Are Comparison Operators, and How Do They Work?
challengeType: 11
videoId: 1E_U3oP18sA
challengeType: 19
dashedName: what-are-comparison-operators-and-how-do-they-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are comparison operators and how do they work?
Comparison operators allow you to compare two values and return a `true` or `false` result. You can then use the result to make a decision or control the flow of your program. You use comparisons in `if` statements, loops, and many other situations where you need to make decisions based on certain conditions. Let's dive into the most common comparison operators and see how they work.
The greater than operator, represented by a right-angle bracket (`>`), checks if the value on the left is greater than the one on the right:

View File

@@ -1,19 +1,12 @@
---
id: 673271fd11d063daf0cf8d20
title: What Are Conditional Statements, and How Do If/Else If/Else Statements Work?
challengeType: 11
videoId: 6BZn4rKzpJ8
challengeType: 19
dashedName: what-are-conditional-statements-and-how-do-if-else-if-else-statements-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are conditional statements, and how do `if/else` statements work?
Conditional statements let you make decisions in your JavaScript code. They allow your program to flow in a particular way based on certain conditions. Let's take a look at how `if`, `else if`, `else`, and the ternary operator work to let you control the flow of your code.
An `if` statement takes a condition and runs a block of code if that condition is truthy. Truthy values are any values that result in `true` when evaluated in a Boolean context like an `if` statement. Here are examples of truthy values:

View File

@@ -1,19 +1,12 @@
---
id: 6732720e95f6a0db526a2e4d
title: What Are Binary Logical Operators, and How Do They Work?
challengeType: 11
videoId: bFo2p8aD9Y8
challengeType: 19
dashedName: what-are-binary-logical-operators-and-how-do-they-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are binary logical operators, and how do they work?
Binary logical operators help you evaluate two expressions and return a result based on their truthiness. Let's look at the three most common binary logical operators: logical AND, logical OR, and the nullish coalescing operator.
The logical AND operator is represented by a double ampersand (`&&`). It checks if both operands are true and returns a result. If both operands are truthy, it returns the second value, that is, the one on the right:
@@ -103,7 +96,7 @@ let theme = userSettings.theme ?? 'light';
console.log(theme); // light
```
In the example above, we have an object called `userSettings` that contains `theme`, `volume` and `notifications` properties. We are accessing the `theme` using dot notation like `userSettings.theme`. You will learn more about how to work with objects in a future lecture video. Since the user's `theme` is currently set to `null`, then the string `light` will be logged to the console.
In the example above, we have an object called `userSettings` that contains `theme`, `volume` and `notifications` properties. We are accessing the `theme` using dot notation like `userSettings.theme`. You will learn more about how to work with objects in a future lecture. Since the user's `theme` is currently set to `null`, then the string `light` will be logged to the console.
# --questions--

View File

@@ -1,19 +1,12 @@
---
id: 67327217e70ee0db7913b255
title: What Is the Math Object in JavaScript, and What Are Some Common Methods?
challengeType: 11
videoId: 1VUy-I4sNKQ
challengeType: 19
dashedName: what-is-the-math-object-in-javascript-and-what-are-some-common-methods
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What is the `Math` object in JavaScript, and what are some common methods?
When diving into JavaScript, you'll quickly discover that performing mathematical operations is a common task. While basic arithmetic operators can handle simple calculations, JavaScript offers a built-in `Math` object to tackle more complex math challenges.
This handy tool provides a variety of methods that make it easier to perform advanced calculations and manipulate numbers. Let's explore these methods and see how they can simplify your coding experience.

View File

@@ -1,19 +1,12 @@
---
id: 672d266e014ef8216df987d2
title: What Is the Number Type in JavaScript, and What Are the Different Types of Numbers Available?
challengeType: 11
videoId: ccHZ7e8z4SM
challengeType: 19
dashedName: what-is-the-number-type-in-javascript-and-what-are-the-different-types-of-numbers-available
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What is the `Number` type in JavaScript, and what are the different types of numbers available?
The `Number` type is one of the most used data types in JavaScript and other programming languages. Numbers might seem simple, but there's a lot to explore when it comes to numbers in JavaScript. So, let's take a deeper look. In JavaScript, the `Number` data type represents a numeric value.
Unlike many other programming languages that separate integers and floating-point numbers into different types, JavaScript uses one unified `Number` type to account for numbers. This means you can work with whole numbers, decimals, and even special numeric values all under the same `Number` data type umbrella.

View File

@@ -1,19 +1,12 @@
---
id: 673271884bf678d8b9c64f56
title: What Are the Different Arithmetic Operators in JavaScript?
challengeType: 11
videoId: guUVaI-X7Gk
challengeType: 19
dashedName: what-are-the-different-arithmetic-operators-in-javascript
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are the different arithmetic operators in JavaScript?
JavaScript provides tools to perform basic arithmetic operations on numbers, such as addition, subtraction, multiplication, and division. JavaScript also includes operators for more complex arithmetic operations, such as remainder and exponentiation.
All these tools are called arithmetic operators. Let's look at these operators in detail, how to use them and how to combine them.
@@ -127,7 +120,7 @@ const result = 10 + 5 * 2 - 8 / 4;
console.log(result); // 18
```
When you mix different operators in a single expression, the JavaScript engine follows a system called operator precedence to determine the order of operations. Operator precedence determines the order in which operations are executed in expressions. You will learn more about operator precedence in future lecture videos.
When you mix different operators in a single expression, the JavaScript engine follows a system called operator precedence to determine the order of operations. Operator precedence determines the order in which operations are executed in expressions. You will learn more about operator precedence in future lectures.
# --questions--

View File

@@ -1,19 +1,12 @@
---
id: 67327195e77b1bd90bdd49d7
title: What Happens When You Try to Do Calculations with Numbers and Strings?
challengeType: 11
videoId: KPFskFoAzUA
challengeType: 19
dashedName: what-happens-when-you-try-to-do-calculations-with-numbers-and-strings
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What happens when you try to do calculations with numbers and strings?
JavaScript is a language where things sometimes work in surprising, or even weird, ways. One such surprise occurs when you mix numbers and strings in calculations. The first thing you'll probably try is to add a number and a string. In JavaScript, the `+` operator does double duty. It handles both addition and string concatenation, which is a way to join two strings together.
When you use `+` with a number and a string, JavaScript decides to treat them both as strings and joins them together. If you check the type of the result with the `typeof` operator, you'd see it's indeed a string:

View File

@@ -1,19 +1,12 @@
---
id: 6732719e2e3ad4d947410b65
title: How Does Operator Precedence Work?
challengeType: 11
videoId: pnXCNw4fCyU
challengeType: 19
dashedName: how-does-operator-precedence-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
How does operator precedence work?
If you write an expression with several operators in JavaScript, how does JavaScript decide which one to evaluate first? This is where operator precedence comes in. Let's explore operator precedence in detail with code examples, and also what happens when operators have the same precedence.
Operator precedence determines the order in which operations are evaluated in an expression. Operators with higher precedence are evaluated before those with lower precedence. Think of operator precedence like in math, where division and multiplication happen before addition and subtraction.

View File

@@ -1,19 +1,12 @@
---
id: 673271a8998ddfd97578d095
title: How Do the Increment and Decrement Operators Work?
challengeType: 11
videoId: byGvO4RC26w
challengeType: 19
dashedName: how-do-the-increment-and-decrement-operators-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
How do the increment and decrement operators work?
If you're working with numbers and need to increase or decrease a value by one, the increment and decrement operators make the job easier. Let's break it down in a simple way.
The increment and decrement operators are represented by `++` and `--`, respectively. They both allow you to adjust the value of a variable by `1`.

View File

@@ -1,19 +1,12 @@
---
id: 673271b4213033d9b661c70e
title: What Are Compound Assignment Operators in JavaScript, and How Do They Work?
challengeType: 11
videoId: _OotACioDZs
challengeType: 19
dashedName: what-are-compound-assignment-operators-in-javascript-and-how-do-they-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are compound assignment operators in JavaScript, and how do they work?
In JavaScript, all arithmetic operators have a compound assignment form. Compound assignment operators allow you to perform a mathematical operation and reassign the result back to the variable in one line of code. Instead of writing something like this:
```js

View File

@@ -1,19 +1,12 @@
---
id: 673271e8e3d43bda89f723b3
title: What Are Unary Operators, and How Do They Work?
challengeType: 11
videoId: VTY8Y9qfvTs
challengeType: 19
dashedName: what-are-unary-operators-and-how-do-they-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are unary operators, and how do they work?
Unary operators act on a single operand to perform operations like type conversion, value manipulation, or checking certain conditions. Let's look at some common unary operators and how they work.
The unary plus operator converts its operand into a number. If the operand is already a number, it remains unchanged.
@@ -48,7 +41,7 @@ let isOffline = false;
console.log(!isOffline); // true
```
The bitwise NOT operator is a less commonly used unary operator. Represented by a tilde, `~`, it inverts the binary representation of a number. Computers store numbers in binary format (1s and 0s). The `~` operator flips every bit, meaning it changes all 1s to 0s and all 0s to 1s. You will learn more about binary and bits in a future lecture video.
The bitwise NOT operator is a less commonly used unary operator. Represented by a tilde, `~`, it inverts the binary representation of a number. Computers store numbers in binary format (1s and 0s). The `~` operator flips every bit, meaning it changes all 1s to 0s and all 0s to 1s. You will learn more about binary and bits in a future lecture.
```js
const num = 5; // The binary for 5 is 00000101
@@ -72,7 +65,7 @@ console.log(result); // undefined
<a href="javascript:void(0);">Click Me</a>
```
Finally, there is the `typeof` operator which you learned about in previous lecture videos. This returns the type of its operand as a string.
Finally, there is the `typeof` operator which you learned about in previous lectures. This returns the type of its operand as a string.
```js
const value = 'Hello world';

View File

@@ -1,19 +1,12 @@
---
id: 673271f39f124ddac28866d5
title: What Are Bitwise Operators, and How Do They Work?
challengeType: 11
videoId: Wga6bSebwFg
challengeType: 19
dashedName: what-are-bitwise-operators-and-how-do-they-work
---
# --description--
Watch the video or read the transcript and answer the questions below.
# --transcript--
What are bitwise operators, and how do they work?
Bitwise operators in JavaScript are special operators that work on the binary representations of numbers. To understand bitwise operators, we first need to grasp the concept of bits and binary numbers. In computing, a bit is the most basic unit of information. It can have only two values: `0` or `1`. Binary is a number system that uses only these two digits to represent all numbers.
For example, the binary representation of the decimal number `10` is `1010`. In this system, each digit represents a power of `2`, starting from the rightmost digit and increasing as we move left.