mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): typos in core JS fundamentals lecture (#60151)
This commit is contained in:
parent
e2407ac676
commit
7b3a19f433
@ -14,7 +14,7 @@ Watch the video or read the transcript and answer the questions below.
|
||||
|
||||
What are linters and formatters, and how can they help you with code consistency?
|
||||
|
||||
In the world of software development maintaining clean, consistent and error-free code is important. This is where linters and formatters come into play. These tools are essential for developers to ensure code quality and consistency across a projects and teams.
|
||||
In the world of software development maintaining clean, consistent and error-free code is important. This is where linters and formatters come into play. These tools are essential for developers to ensure code quality and consistency across projects and teams.
|
||||
|
||||
Let's start with linters. A linter is a static code analysis tool that flags programming errors, bugs, stylistic errors, and suspicious constructs. The term lint comes from a Unix utility that examines C language source code.
|
||||
|
||||
@ -56,7 +56,7 @@ Both linters and formatters can be integrated into your development workflow in
|
||||
|
||||
Many development teams set up these tools as part of their project configuration often with pre-commit hooks that run the linter and formatter before allowing code to be committed. This ensures that all code in the repository meets the teams standards for quality and style.
|
||||
|
||||
In summary, linters and formatters are powerful tools that help maintain code quality, catch potential errors early, and ensure consistency across codebases. By automating this aspects of code review they allow developers to focus more on solving problems and less on debating code style.
|
||||
In summary, linters and formatters are powerful tools that help maintain code quality, catch potential errors early, and ensure consistency across codebases. By automating these aspects of code review they allow developers to focus more on solving problems and less on debating code style.
|
||||
|
||||
# --questions--
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ What is memory management, and how does it work in JavaScript?
|
||||
|
||||
Memory management is an essential concept in programming, but it can be a bit confusing for beginners, let's break it down in simple terms.
|
||||
|
||||
When you run a program, including JavaScript code in a web browser, it needs memory to store all the information its working with. This includes variables, functions, objects, basically everything your code creates and uses. Memory management is the process of controlling this memory, allocating it when needed, and freeing it up when it's no longer needed. In some programming languages, developers have to manually manage memory. They need to explicitly tell the computer when to allocate memory for new things and when to free up memory that's no longer needed. This can be powerful but also tricky as for getting to free memory can lead to memory leaks.
|
||||
When you run a program, including JavaScript code in a web browser, it needs memory to store all the information its working with. This includes variables, functions, objects, basically everything your code creates and uses. Memory management is the process of controlling this memory, allocating it when needed, and freeing it up when it's no longer needed. In some programming languages, developers have to manually manage memory. They need to explicitly tell the computer when to allocate memory for new things and when to free up memory that's no longer needed. This can be powerful but also tricky as forgetting to free memory can lead to memory leaks.
|
||||
|
||||
JavaScript however uses automatic memory management. This means that JavaScript (more specifically the JavaScript engine in your web browser) takes care of memory allocation and deallocation for you. You don't have to explicitly free memory in your code. This automatic process is often called garbage collection.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user