Skip to main content

Search complete. 26 mentions across 8 episodes found for "const".

Sep 17, 2026

speaker_0NARRATOR
2:11
Name, Bob, age, 25.
speaker_0NARRATOR
2:14
Const names equals users dot map user equals greater than user dot name.
speaker_0NARRATOR
2:19
Slash slash names is Alice, Bob.
speaker_0NARRATOR
2:23
Key point to remember, if your callback does not return anything, map produces an array full of undefined values.
speaker_0NARRATOR
2:45
Example.
speaker_0NARRATOR
2:46
Keep only even numbers.
speaker_0NARRATOR
2:48
Const numbers equals 1, 2, 3, 4, 5, 6.
speaker_0NARRATOR
2:53
Const evens equals numbers.filter n equals greater than n% 2 equals equals equals 0.
speaker_0NARRATOR
1:07
Mini example.
speaker_0NARRATOR
1:08
Const prices equals 10, 25, 40.
speaker_0NARRATOR
1:12
Const discounted equals prices.map p equals greater than p 0.9 slash slash 9 22.5 36 const expensive equals prices.filter p equals greater than p greater than 20 slash slash 25 40 const total equals prices.reduce he p equals greater than he plus p 0 slash slash 75.
speaker_0NARRATOR
1:37
Keep this model in mind.
speaker_0NARRATOR
1:38
Select transform aggregate.
speaker_0NARRATOR
0:59
Examples.
speaker_0NARRATOR
1:00
Const fruits equals apple, banana, cherry.
speaker_0NARRATOR
1:03
Const numbers equals 10, 20, 30, 40.
speaker_0NARRATOR
1:08
Const empty equals.
speaker_0NARRATOR
1:10
In the first example, apple is at index 0, banana is at index 1, and cherry is at index 2.
speaker_0NARRATOR
1:16
The third example creates an empty array with no elements yet.
speaker_0NARRATOR
5:19
Array.isArrayHello returns false.
speaker_0NARRATOR
5:22
Destructuring arrays, ES6 feature, ES6 introduced array destructuring, a fast way to extract values from an array into separate variables.
speaker_0NARRATOR
1:22
For example, number of clicks.
speaker_0NARRATOR
1:23
Constants that never change are often written in uppercase with underscores.
speaker_0NARRATOR
1:27
For example, max underscore attempts.
speaker_0NARRATOR
1:29
Avoid single letters, except for short loop counters like I, abbreviations that are not obvious, and names that lie about what the value contains.
speaker_0NARRATOR
5:51
Say hello.
speaker_0NARRATOR
5:52
Const say hello equals, equals greater than console.log high.
speaker_0NARRATOR
5:56
The second example throws an error because the arrow function is not yet defined when it is called.
speaker_0NARRATOR
6:01
Choosing which to use.
speaker_0NARRATOR
1:32
With const, you must assign a value immediately when declaring it.
speaker_0NARRATOR
1:35
The following is invalid.
speaker_0NARRATOR
1:37
Const name, slash slash error.
speaker_0NARRATOR
1:40
Missing initializer in const declaration.
speaker_0NARRATOR
1:43
Important nuance about const and objects.
speaker_0NARRATOR
1:45
Const prevents reassignment of the variable itself, but it does not make the content immutable when the value is an object or an array.
speaker_0NARRATOR
1:53
You cannot reassign the variable, but you can still modify the properties or elements inside.
speaker_0NARRATOR
1:58
Example, const user equals name Alice.
speaker_0NARRATOR
4:04
Modern JavaScript also offers a shorter form called an arrow function.
speaker_0NARRATOR
4:08
Const find minimum equals numbers equals greater than both do the same job.
speaker_0NARRATOR
4:13
Working with lists.
speaker_0NARRATOR
4:14
In JavaScript, a list is written with square brackets.
speaker_0NARRATOR
5:01
Comments in JavaScript start with two slashes, slash, slash for a single line or are wrapped in for several lines.
speaker_0NARRATOR
5:07
Let us tie everything together with a complete example that reuses your cash register logic in JavaScript.
speaker_0NARRATOR
5:13
Const prices equals twelve, eight, twenty-five.
speaker_0NARRATOR
5:16
Let total equal zero.
Danté StewartGUEST
28:20
I think on some level, we the people, in order to form a more perfect union, to establish justice, to ensure domestic tranquility.
Danté StewartGUEST
28:30
At the beginning of the Consti- the, the, the, uh, Constitution in the Preamble, that in some sense is the ghost that haunt us right now spiritually.
Danté StewartGUEST
28:39
We're struggling with we the people.
Danté StewartGUEST
28:42
Now, if I can, let me put on reverend hat real quick and let me turn into a preacher.

We value your privacy

We use cookies to understand how you use our platform and to improve your experience. Click “Accept All” to consent, or “Decline non-essential” to opt out of non-essential cookies. Read our Privacy Policy.