Two variables which are same
See original GitHub issueDescribe the Issue
The issue is in Backend Development and APIs Course, MongoDB and Mongoose section challenge “Create a Model”
In the instructions, we are asked to create a model called Person
from personSchema
by the code:
const Person = mongoose.model("Person", personSchema);
However in the folder boilerplate-mongomongoose
, there is already an empty variable:
let Person;
Following the instructions gives a bug as the Person variable is already declared. We have to delete the empty variable in order to continue with the instructions. Maybe the hints should be corrected for the challenge or the variable name in the instruction should be changed.
Affected Page
https://www.freecodecamp.org/learn/back-end-development-and-apis/mongodb-and-mongoose/create-a-model
Your code
Expected behavior
We should not get an error after running the code.
Screenshots
No response
System
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 22]
Additional context
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Can Different Variables Have the Same Value? - Mashup Math
With this algebraic truth in mind, let's take a quick look at the simplest reason why two variables can have the same value,...
Read more >Even if two variables refer to the same value, are they different ...
If two variables have the same value, such as int a=1; int b=1; , most languages will create two different objects. But some...
Read more >What is the Difference Between “is” and “==” in Python
== operator is used to check whether two variables reference objects with the same value. · is operator is used to check whether...
Read more >Example 4: Comparing Variables That Are in the Same Data Set
Specify two variables from the base data set to compare. The VAR and WITH statements specify the variables in the base data set...
Read more >Check if multiple variables have the same value - Stack Overflow
If you have an arbitrary sequence, use the all() function with a generator expression: values = [x, y, z] # can contain any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe
the existing variable Person
just for clarity?So, it sounds like we can’t remove
let Person;
but we could clarify the wording slightly.How about the following?