Issues With Functions Lesson

Is anyone else having issues submitting correct code in this Functions lessons? There have been a few lessons in a row where I type the correct code, but for the life of me I continue to get errors (usually the same object error) and when I click the “Get Code” button, it’s literally the same code I have typed out.

I’ve been able to just get the code and continue with the next lesson, but it’s just weird that the exact same code I type out doesn’t work all the time. I’ve copied and pasted the result from the “Get Code” and the code I typed out to compare and they were exactly the same. Last time this happened was yesterday but just wanting to know if this happened for anyone else?

can you give examples of this? include exercise url and code that isn’t working. If we can’t replicate the problem, there isn’t much we can do

I’ve noticed that the system is extremely picky about code at times. Even when your code is generating the exact desired result, the way it’s checking the code itself can throw it off. This has most often happened to me when I miss a small part of instruction, like using const instead of let, or if I use a double quote " when the lesson example was using a single quote '. Watch very carefully for small things like that, and try to avoid changing anything in the supplied (or carried over from earlier) code unless you’re specifically asked to do so.

What that course is doing is looking at the syntax tree and making exact comparisons. This means things like whitespace get ignored, because they’re ignored by the language so the resulting syntax tree will be identical. But if you change the meaning at all (like let/const/var all doing different things) or change the order of things even if they’re still equivalent, then the syntax tree changes

It’s a whole lot better than looking for exact matches in the code file (yeah, they do that in several courses…) but still a whole lot worse than looking at what is actually being done functionally

using let or const has impact on your program, so that is not so surprising. Programming is very precious and tedious to do

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.