learn-co-curriculum / fewpjs-js-fundamentals-variables-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
The second bullet point is describing the test it relates to incorrectly.
The bullet says this:
In the next it function call, we are still describing companyName. This time, it says it raises error if the companyName is changed. The next line of code tests this. It's ok if some of the code in that line is confusing. Just know that the code attempts to change companyName to a different value, and that this reassignment should throw an error. So you need to make sure that you are using the correct type of variable declaration such that attempting to reassign the variable throws an error.
The test it is describing doesn't exist. This is the test in its place:
it('is defined as a const', function () {
expect(js).to.match(/const companyName/, "Expected companyName to be a const"); });
The bullet needs to be changed to reflect this test.
the code
const companyName = 'Scuber'
does not pass the test case
companyName 1) raises error if the companyName is changed
even though it should...
Test passing, page on Learn doesn't seem to be aware of this.
The tests pass, but the page does not reflect that.
The tests currently try to test for companyName being a const, and the other two variables being lets. It fails at all three instances.
Behavior:
For the following code:
const companyName = "Scuber";
const mostProfitableNeighborhood = "Chelsea";
const companyCeo = "Susan Smith";
All tests pass except the one checking if companyName is a const, which fails due to the use of an undeclared variable in the test (ReferenceError: js is not defined).
Expected:
Later tests checking for let declaration should fail by raising typeError. First test should pass by raising typeError.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.