Comments (7)
I agree, it seems like an odd choice.
Unreachable code and variable scope should be taught separately.
from freecodecamp.
@naomi-lgbt or @Ksound22 ?
Are either of you free to make these updates?
I don't want to open a PR right before I go on vacation.
Thanks 👍
from freecodecamp.
ugh, I just saw step 52. I don't understand why step 51 would -implicitly- suggest that a person should create a new variable after the return only to point it out as wrong in the next step. step 51 should show us that a 'correct' declaration of the variable in a local scope will result in a ref. error when the variable is referenced beyond that scope.
As for teaching people not to put code after the return, that should be a -separate- and -unrelated- step in this case.
on the other hand, step 51 could -explicitly- tell people to put the new line of code after the return only to point out it is incorrect in step 52. At least this way, if a person knows enough to type it in correctly, step 51 could fail and make them type it into the wrong spot? (or just scratch this and take my original suggestion of fixing step 51 and teaching about not writing code after returns separately)
from freecodecamp.
@naomi-lgbt or @Ksound22 ?
Are either of you free to make these updates?
I don't want to open a PR right before I go on vacation.
Thanks 👍
Can we open it up for contribution?
from freecodecamp.
I'd prefer to see the instructions updated to specify putting the variable after the return - I think it's valuable information to teach.
from freecodecamp.
This is the first time campers will be taught about variable scope. They may have coded for less than half a day.
Adding unreachable code as part of teaching variable scope can muddy the water for the learner, where they may end up making a correlation between the two that doesn't exist.
I would suggest we split it up into separate steps that focus on each topic.
from freecodecamp.
I could work with that, yes
from freecodecamp.
Related Issues (20)
- Lesson: Use PropTypes to Define the Props You Expect HOT 1
- Reaccessing Home Page HOT 2
- Statistics calculator - Step 5: should not require an anonymous callback HOT 7
- Timeout for Euler 187
- Solution error in Data Visualization lesson HOT 1
- Providing additional unit testing for component: delete-modal.tsx HOT 1
- Long loops with console log output causes "out of memory" crash HOT 2
- Website slows down/learn
- [Building a Cafe Menu] Clarify what `text-align` does in step 11 and 12 HOT 1
- Learn Recursion by Building a Decimal to Binary Converter - Step 1: Wrong element mentioned HOT 5
- Learn Recursion by Building a Decimal to Binary Converter - Step 104: Typo HOT 6
- Learn Basic String Array Methods by Building a Music Player - Step 88: Tip Issue HOT 1
- Python Scientific Computing: Budget App Chart Unit Test Issue HOT 1
- Pyodide fatal error when class goes into recursive printing itself
- Learn the Bisection Method by Finding the Square Root of a Number step 21 HOT 3
- Remove unused classes from `project-links.css`
- Challenge completion indicator should not have side margin HOT 3
- step 73 of building a magazine has a phrase that is hard to understand HOT 3
- Dedicated section teaching callbacks
- Legacy Python For Everybody - More Conditional Structures HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecodecamp.