Javascript-FreeCodeCamp: freeCodeCamp.org's open-source codebase and curriculum

freeCodeCamp.org Social Banner

Pull Requests Welcome first-timers-only Friendly Open Source Helpers Setup Automated

freeCodeCamp.org's open-source codebase and curriculum

freeCodeCamp.org is a friendly community where you can learn to code for free. It is run by a donor-supported 501(c)(3) nonprofit to help millions of busy adults transition into tech. Our community has already helped more than 10,000 people get their first developer job.

Our full-stack web development curriculum is completely free and self-paced. We have thousands of interactive coding challenges to help you expand your skills.

Table of Contents

Certifications

freeCodeCamp.org offers several free developer certifications. Each of these certifications involves building 5 required web app projects, along with hundreds of optional coding challenges to help you prepare for those projects. We estimate that each certification will take a beginner programmer around 300 hours to earn.

Each of these 30 projects in the freeCodeCamp.org curriculum has its own agile user stories and automated tests. These help you build up your project incrementally and ensure you've fulfilled all the user stories before you submit it.

You can pull in these test suites through freeCodeCamp's CDN. This means you can build these projects on websites like CodePen and Glitch - or even on your local computer's development environment.

Once you’ve earned a certification, you will always have it. You will always be able to link to it from your LinkedIn or résumé. And when your prospective employers or freelance clients click that link, they’ll see a verified certification specific to you.

The one exception to this is if we discover violations of our Academic Honesty Policy. When we catch people unambiguously plagiarizing (submitting other people's code or projects as their own without citation), we do what all rigorous institutions of learning should do - we revoke their certifications and ban those people.

Here are our six core certifications:

1. Responsive Web Design Certification

2. JavaScript Algorithms and Data Structures Certification

3. Front End Libraries Certification

4. Data Visualization Certification

5. APIs and Microservices Certification

6. Information Security and Quality Assurance Certification

Full Stack Development Certification

Once you have earned all 6 of these certifications, you'll be able to claim your freeCodeCamp.org Full Stack Development Certification. This final distinction signifies that you’ve completed around 1,800 hours of coding with a wide range of web development tools.

Legacy Certifications

We also have 4 legacy certifications dating back to our 2015 curriculum, which are still available. All of the required projects for these legacy certifications will remain available on freeCodeCamp.org.

  • Legacy Front End Development Certification
  • Legacy Data Visualization Certification
  • Legacy Back End Development Certification
  • Legacy Information Security and Quality Assurance Certification

The Learning Platform

This code is running live at freeCodeCamp.org.

Our community also has:

  • A forum where you can usually get programming help or project feedback within hours.
  • A YouTube channel with free courses on Python, SQL, Android, and a wide variety of other technologies.
  • A podcast with technology insights and inspiring stories from developers.
  • A Developer News publication, a free, open source, no-ads place to cross-post your blog articles.

Join our community here.

Reporting Bugs and Issues

If you think you've found a bug, first read the how to report a bug article and follow its instructions.

If you're confident it's a new bug and have confirmed that someone else is facing the same issue, go ahead and create a new GitHub issue. Be sure to include as much information as possible so we can reproduce the bug.

Reporting Security Issues and Responsible Disclosure

If you think you have found a vulnerability, please report responsibly. Don't create GitHub issues for security issues. Instead, please send an email to [email protected] and we'll look into it immediately.

We appreciate any responsible disclosure of vulnerabilities that might impact the integrity of our platforms and users. While we do not offer any bounties or swags at the moment, we'll be happy to list your name in our Hall of Fame for security researchers.

Contributing

The freeCodeCamp.org community is possible thanks to thousands of kind volunteers like you. We welcome any and all contributions to the community and are excited to welcome you aboard.

Please follow these steps to contribute.

Platform, Build and Deployment Status

The general platform status for all our applications is available at status.freecodecamp.org. The build and deployment status for the code is available in our DevOps Guide.

License

Copyright © 2020 freeCodeCamp.org

The content of this repository is bound by the following licenses:

  • The computer software is licensed under the BSD-3-Clause license.
  • The learning resources in the /curriculum directory including their subdirectories thereon are licensed under the CC-BY-SA-4.0 license.

Comments

  • chore(deps): update storybook monorepo to v6.4.14
    chore(deps): update storybook monorepo to v6.4.14

    Jan 21, 2022

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @storybook/addon-actions | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/addon-docs | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/addon-essentials | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/addon-links | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/builder-webpack5 | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/manager-webpack5 | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence | | @storybook/react | 6.4.13 -> 6.4.14 | age | adoption | passing | confidence |


    Release Notes

    storybookjs/storybook

    v6.4.14

    Compare Source

    Bug Fixes
    • CLI: Add --no-manager-cache to build-storybook (#​17300)
    • CSF3: Remove path from autoTitle browser code (#​17185)
    • Addon-docs: Fix docs.disable parameter on DocsPage (#​17256)
    • Core: Fix issue with recursive glob with prior special chars (#​17252)
    • Webpack: Fix for process fallback using require.resolve (#​17249)
    Dependency Upgrades
    • Upgrade compodoc for colors.js bug (#​17266)
    • Upgrade jscodeshift dependency for colors.js bug (#​17265)
    • Restore prettier >= 2.2.1 to satisfy previous constraints (#​17257)

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    scope: tools/scripts renovate 
    Reply
  • boilerplate-advancednode: `npm i` fails on Apple Silicon because of incompatible Node version
    boilerplate-advancednode: `npm i` fails on Apple Silicon because of incompatible Node version

    Jan 21, 2022

    Note: I'm opening this issue here as it doesn't seem to be possible to open issues on the boilerplate-advancednode repository.

    Affected page

    https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/set-up-a-template-engine https://github.com/freeCodeCamp/boilerplate-advancednode/

    Your code

    Running npm i on an Apple Silicon Mac results in the following error:

    npm ERR! code 1
    npm ERR! path /Users/ce-dev/Documents/dev/courses/freecodecamp-projects/06 Quality Assurance/boilerplate-advancednode/node_modules/node
    npm ERR! command failed
    npm ERR! command sh -c node installArchSpecificPackage
    npm ERR! npm ERR! code ETARGET
    npm ERR! npm ERR! notarget No matching version found for [email protected]
    npm ERR! npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! npm ERR! notarget a package version that doesn't exist.
    npm ERR!
    npm ERR! npm ERR! A complete log of this run can be found in:
    npm ERR! npm ERR!     /Users/ce-dev/.npm/_logs/2022-01-21T14_43_20_296Z-debug.log
    npm ERR! node:internal/modules/cjs/loader:936
    npm ERR!   throw err;
    npm ERR!   ^
    npm ERR!
    npm ERR! Error: Cannot find module 'node-darwin-arm64/package.json'
    npm ERR! Require stack:
    npm ERR! - /Users/ce-dev/Documents/dev/courses/freecodecamp-projects/06 Quality Assurance/boilerplate-advancednode/node_modules/node/installArchSpecificPackage.js
    npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    npm ERR!     at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    npm ERR!     at ChildProcess.<anonymous> (/Users/ce-dev/Documents/dev/courses/freecodecamp-projects/06 Quality Assurance/boilerplate-advancednode/node_modules/node-bin-setup/index.js:18:27)
    npm ERR!     at ChildProcess.emit (node:events:390:28)
    npm ERR!     at maybeClose (node:internal/child_process:1064:16)
    npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
    npm ERR!   code: 'MODULE_NOT_FOUND',
    npm ERR!   requireStack: [
    npm ERR!     '/Users/ce-dev/Documents/dev/courses/freecodecamp-projects/06 Quality Assurance/boilerplate-advancednode/node_modules/node/installArchSpecificPackage.js'
    npm ERR!   ]
    npm ERR! }
    

    This is because [email protected], which is listed as a dependency, does not run on Apple Silicon.

    Expected behavior

    Users should be able to install dependencies.

    System

    • Device: MacBook Air M1
    • OS: MacOS 12.1
    • Browser: n/a

    Additional context

    Changing the dependencies to the following fixes the problem.

    "dependencies": {
      "dotenv": "^8.2.0",
      "express": "^4.16.1",
      "mongodb": "^3.6.1",
      "node": "^17.3.1"
    },
    

    Everything still seems to work as I was able to pass the first challenge ("Set up a Template Engine") with these packages, but I have not done any testing beyond "seems to works on my system and on Heroku".

    type: bug scope: curriculum status: waiting triage 
    Reply
  • docs: add learntocode RPG
    docs: add learntocode RPG

    Jan 21, 2022

    Checklist:

    • [X] I have read freeCodeCamp's contribution guidelines.
    • [X] My pull request has a descriptive title (not a vague title like Update index.md)
    • [X] My pull request targets the main branch of freeCodeCamp.
    • [X] I have tested these changes either locally on my machine, or GitPod.

    Closes #XXXXX

    Pulls the i18n instructions from the repo's readme.

    scope: docs 
    Reply
  • feat(learn, i18n): enable japanese certifications
    feat(learn, i18n): enable japanese certifications

    Jan 21, 2022

    Checklist:

    • [x] I have read freeCodeCamp's contribution guidelines.
    • [x] My pull request has a descriptive title (not a vague title like Update index.md)
    • [x] My pull request targets the main branch of freeCodeCamp.
    • [x] I have tested these changes either locally on my machine, or GitPod.

    Closes #XXXXX

    I refered to the following PRs (when we enabled Ukrainian language) https://github.com/freeCodeCamp/freeCodeCamp/pull/44454 https://github.com/freeCodeCamp/freeCodeCamp/pull/44461/

    platform: client scope: i18n 
    Reply
  • chore(deps): update dependency nanoid to v3.1.31 [security]
    chore(deps): update dependency nanoid to v3.1.31 [security]

    Jan 21, 2022

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | nanoid | | | 1.3.4 -> 3.1.31 | | nanoid | dependencies | major | 3.1.30 -> 3.1.31 |

    GitHub Vulnerability Alerts

    CVE-2021-23566

    The package nanoid before 3.1.31 are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.


    Release Notes

    ai/nanoid

    v3.1.31

    Compare Source

    • Fixed collision vulnerability on object in size (by Artyom Arutyunyan).

    v3.1.30

    Compare Source

    • Reduced size for project with brotli compression (by Anton Khlynovskiy).

    v3.1.29

    Compare Source

    • Reduced npm package size.

    v3.1.28

    Compare Source

    • Reduced npm package size.

    v3.1.27

    Compare Source

    • Cleaned dependencies from development tools.

    v3.1.26

    Compare Source

    • Improved performance (by Eitan Har-Shoshanim).
    • Reduced npm package size.

    v3.1.25

    Compare Source

    • Fixed browserify support.

    v3.1.24

    Compare Source

    • Fixed browserify support (by Artur Paikin).

    v3.1.23

    Compare Source

    • Fixed esbuild support.

    v3.1.22

    Compare Source

    • Added default and browser.default to package.exports.

    v3.1.21

    Compare Source

    • Reduced npm package size.

    v3.1.20

    Compare Source

    • Fix ES modules support.

    v3.1.19

    Compare Source

    • Reduced customAlphabet size (by Enrico Scherlies).

    v3.1.18

    Compare Source

    • Fixed package.exports.

    v3.1.17

    Compare Source

    • Added files without process.

    v3.1.16

    Compare Source

    • Speeded up Nano ID 4 times (by Peter Boyer).

    v3.1.15

    Compare Source

    • Fixed package.types path.

    v3.1.14

    Compare Source

    • Added package.types.

    v3.1.13

    Compare Source

    • Removed Node.js 15.0.0 with randomFillSync regression from engines.node.

    v3.1.12

    Compare Source

    • Improved IE 11 docs.

    v3.1.11

    Compare Source

    • Fixed asynchronous customAlphabet in browser (by @​LoneRifle).

    v3.1.10

    Compare Source

    • Fix ES modules support.

    v3.1.9

    Compare Source

    • Try to fix React Native Expo support.

    v3.1.8

    Compare Source

    • Add React Native Expo support.

    v3.1.7

    Compare Source

    • Clean up code.

    v3.1.6

    Compare Source

    • Avoid self using.

    v3.1.5

    Compare Source

    • Improve IE docs and warning.

    v3.1.4

    • Restrict old Node.js 13 by engines.node (by Cansin Yildiz).

    v3.1.3

    • Reduced async exports size (by Artyom Arutyunyan).
    • Moved from Jest to uvu (by Vitaly Baev).

    v3.1.2

    Compare Source

    • Reduced npm package size.

    v3.1.1

    Compare Source

    • Reduced customAlphabet size (by Enrico Scherlies).

    v3.1.0

    Compare Source

    v3.0.2

    Compare Source

    • Fix docs (by Dylan Irlbeck ).

    v3.0.1

    Compare Source

    • Fix React Native warning on non-secure import (by Jia Huang).

    v3.0.0

    Compare Source

    Nano ID 3.0 is the biggest release in the project history. Unfortunately, you will need to change the code of your application. But the changes are very small in most cases. In return, you will have better performance, smaller size, ES modules and TypeScript support.

    Known Issues

    • Only Create React App 4.0 supports dual ESM/CJS modules.

    Simple Case

    In simple cases, you just need to change default import to named import.

    - import nanoid from 'nanoid'
    + import { nanoid } from 'nanoid'
    
    nanoid() //=> "sSAi9F8yakJZPxOCr_WFb"
    nanoid(5) //=> "ISe9l"
    

    If you support IE, you need to transpile node_modules by Babel.

    Non-secure and asynchronous Nano ID need only import changes as well.

    - import nanoid from 'nanoid/non-secure'
    + import { nanoid } from 'nanoid/non-secure'
    
    nanoid() //=> "sSAi9F8yakJZPxOCr_WFb"
    
    - import nanoid from 'nanoid/async'
    + import { nanoid } from 'nanoid/async'
    
    nanoid().then(id => {
      id //=> "sSAi9F8yakJZPxOCr_WFb"
    })
    

    TypeScript

    Remove @types/nanoid if you have it. Nano ID now have built-in types.

    npm uninstall @&#8203;types/nanoid
    

    React Native

    For Expo you need to load the file by direct path:

    - import nanoid from "nanoid/async"
    + import { nanoid } from "nanoid/async/index.native.js"
    

    For the non-Expo environment:

    1. Change polyfill for hardware random generator from expo-random to react-native-get-random-values.

    2. Use sync Nano ID instead of async.

      + import 'react-native-get-random-values'
      
      - import nanoid from 'nanoid/async'
      + import { nanoid } from 'nanoid'
      
        async function createUser () {
          const user = new User()
      -   user.id = await nanoid()
      +   user.id = nanoid()
          return await user.save()
        }
      
    URL-Safe Alphabet

    Our default URL-safe alphabet was moved as named export to nanoid path:

    - import url from 'nanoid/url'
    + import { urlAlphabet } from 'nanoid'
    

    Custom Alphabet

    Now we use the currying API to change the alphabet. It improves performance by pre-calculating some caches for a new alphabet.

    We hope the new API will be more readable compare to the old unclear “generate” word.

    - import nanoidGenerate from 'nanoid/generate'
    + import { customAlphabet } from 'nanoid'
    
    + const nanoid = customAlphabet(alphabet, 10)
    
    - nanoidGenerate(alphabet, 10) //=> "0476921501"
    + nanoid() //=> "0476921501"
    

    Non-secure and asynchronous APIs were also changed:

    - import nanoidGenerate from 'nanoid/async/generate'
    + import { customAlphabet } from 'nanoid/async'
    
    + const nanoid = customAlphabet(alphabet, 10)
    

    Custom Random Generator

    Custom random generator API now is based on currying as well.

    - import nanoidFormat from 'nanoid/format'
    - import url from 'nanoid/url'
    + import { customRandom, urlAlphabet } from 'nanoid'
    
    + const nanoid = customRandom(urlAlphabet, 10, seedRandom)
    
    - nanoidGenerate(seedRandom, url, 10) //=> "sSAi9F8yak"
    + nanoid() //=> "sSAi9F8yak"
    

    We removed a custom random generator from asynchronous API because we didn’t see that somebody used it.

    New Features

    A few good reasons, why you should migrate to Nano ID 3.0:

    • The size was decreased by 10% from 119 to 108 bytes.
    • We got full TypeScript support. We use check-dts to test out .d.ts files.
      id: number = nanoid() // throws Type 'string' is not assignable to type 'number'.
      
    • Nano ID now has out-of-the-box ES modules support and extra file to load Nano ID from jsDelivr (use it only for experiments, because of the bad loading performance). Dual ESM/CommonJS packaging is provided by dual-publish and will work in Node.js ≥12, webpack, Parcel, Rollup, and React Native.
      import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid/nanoid.js'
      

    v2.1.11

    Compare Source

    • Reduce size (by Anton Evzhakov).

    v2.1.10

    Compare Source

    • Reduce size by 10% (by Anton Khlynovskiy).

    v2.1.9

    Compare Source

    • Reduce format and async/format size (by Dair Aidarkhanov).

    v2.1.8

    Compare Source

    • Improve React docs (by Nahum Zsilva).

    v2.1.7

    Compare Source

    • Reduce index, async and non-secure size (by @​polemius).

    v2.1.6

    Compare Source

    • Reduce size (by Stas Lashmanov).
    • Return fast mask for Node.js.

    v2.1.5

    Compare Source

    • Reduce size (by Max Graey).
    • Fix IE support.

    v2.1.4

    Compare Source

    • Reduce generate size (by Vsevolod Rodionov).
    • Reduce format and format size (by Victor).
    • Reduce async, non-secure and non-secure/generate size.
    • Speed up format and async/format (by Max Graey).
    • Improve development process on Windows (by Stanislav Lashmanov).

    v2.1.3

    Compare Source

    • Improve performance (by Stephen Richardson).
    • Reduce size (by Stephen Richardson).

    v2.1.2

    Compare Source

    • Improve docs.

    v2.1.1

    Compare Source

    • Reduce size (by Anton Evzhakov).

    v2.1.0

    Compare Source

    v2.0.4

    Compare Source

    • Improve error text for React Native (by Sebastian Werner).

    v2.0.3

    Compare Source

    • Fix freeze on string in ID length.

    v2.0.2

    Compare Source

    • Improve docs (by Sylvanus Kateile and Mark Stosberg).

    v2.0.1

    Compare Source

    • Reduce npm package size.
    • Mark package as not having side effects (by @​xiaody).

    v2.0.0

    Compare Source


    Configuration

    📅 Schedule: "" (UTC).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    platform: client renovate 
    Reply
  • Typo in bash command for Advanced bash RDB course
    Typo in bash command for Advanced bash RDB course

    Jan 22, 2022

    The directions say to enter the command > stout.txt. But the correct name of the file is > stdout.txt

    Affected page

    https://github.com/freeCodeCamp/learn-advanced-bash-by-building-a-kitty-ipsum-translator/blob/main/TUTORIAL.md#50--stdouttxt

    Proposed fix

    Enter > stdout.txt in the terminal to redirect nothing into the file.

    Screenshots

    Screen Shot 2022-01-22 at 2 46 36 AM type: bug scope: curriculum status: waiting triage 
    Reply
  • chore(i18n,learn): processed translations
    chore(i18n,learn): processed translations

    Jan 23, 2022

    This PR was opened auto-magically by Crowdin.

    scope: curriculum scope: i18n crowdin-sync 
    Reply
  • Learn Relational Databases by Building a Mario Database instructions wording
    Learn Relational Databases by Building a Mario Database instructions wording

    Jan 23, 2022

    Here it says You can see the key for your name column at the bottom, well, I think it was meaningless, we could rather say:

    You can see that the primary key is your name column at the bottom.

    Screenshot from 2022-01-23 21-43-53

    status: waiting triage 
    Reply
  • Error in translating the page Make Motion More Natural Using a Bezier Curve
    Error in translating the page Make Motion More Natural Using a Bezier Curve

    Jan 23, 2022

    Affected page

    https://www.freecodecamp.org/portuguese/learn/responsive-web-design/applied-visual-design/make-motion-more-natural-using-a-bezier-curve

    Your code

    
    
    The values in the Portuguese translation are wrong 0,311, 0,441, 0,444, 1,649. "," instead of "."
    
    

    Expected behavior

    Correct values 0.311, 0.441, 0.444, 1.649.

    Screenshots

    erro

    System

    • Device: Laptop MacBook Pro
    • OS: macOS Big Sur
    • Browser: Safari
    • Version: 15.1

    Additional context

    type: bug scope: curriculum status: waiting triage 
    Reply
  • Update make-motion-more-natural-using-a-bezier-curve.md
    Update make-motion-more-natural-using-a-bezier-curve.md

    Jan 24, 2022

    Checklist:

    • [x] I have read freeCodeCamp's contribution guidelines.
    • [x] My pull request has a descriptive title (not a vague title like Update index.md)
    • [x] My pull request targets the main branch of freeCodeCamp.
    • [x] I have tested these changes either locally on my machine, or GitPod.

    Closes #XXXXX

    scope: curriculum scope: i18n 
    Reply