mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
chore(curriculum): add video ids for recursion and functional programming lectures (#58562)
Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
---
|
||||
id: 6733b0451d6be0065430b418
|
||||
title: What Is Functional Programming?
|
||||
challengeType: 19
|
||||
# videoId: nVAaxZ34khk
|
||||
challengeType: 11
|
||||
videoId: 5GhbJNf8wFg
|
||||
dashedName: what-is-functional-programming
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
Watch the video and answer the questions below.
|
||||
|
||||
# --transcript--
|
||||
|
||||
Functional programming is about writing code that is clean, predictable, and easier to test and debug. Two key concepts we'll explore today are pure functions and avoiding side effects.
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
id: 6734061fe116df617a564a37
|
||||
title: What Is Currying, and How Does It Work?
|
||||
challengeType: 19
|
||||
# videoId: nVAaxZ34khk
|
||||
challengeType: 11
|
||||
videoId: N65U75mUL74
|
||||
dashedName: what-is-currying-and-how-does-it-work
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
Watch the video and answer the questions below.
|
||||
|
||||
# --transcript--
|
||||
|
||||
Currying is a technique where we transform a function that takes multiple arguments into a sequence of functions, each taking a single argument.
|
||||
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
---
|
||||
id: 6733b02d1e556005a544c5e3
|
||||
title: What Is Recursion, and How Does It Work?
|
||||
challengeType: 19
|
||||
# videoId: nVAaxZ34khk
|
||||
challengeType: 11
|
||||
videoId: u2Z7fAAzbYc
|
||||
dashedName: what-is-recursion-and-how-does-it-work
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
Watch the video and answer the questions below.
|
||||
|
||||
Let’s learn how recursion works in JavaScript.
|
||||
# --transcript--
|
||||
|
||||
What is recursion, and how does it work?
|
||||
|
||||
Let's learn how recursion works in JavaScript.
|
||||
|
||||
Recursion is a complicated feature that allows you to call a function repeatedly until a base-case is reached. Unlike a traditional loop, recursion allows you to handle something with an unknown depth, such as deeply nested objects/arrays, or a file tree. But you can also use it for more basic tasks, such as counting down from a given number.
|
||||
|
||||
Let’s construct a function to do exactly that. We’ll call our function recursiveCountdown, and it needs to accept a number. We’ll have it print this number to the console:
|
||||
Let's construct a function to do exactly that. We’ll call our function `recursiveCountdown`, and it needs to accept a number. We’ll have it print this number to the console:
|
||||
|
||||
```js
|
||||
const recursiveCountdown = (number) => {
|
||||
|
||||
Reference in New Issue
Block a user