sortSpeciesByTeeth solution in Visual Studio Code

Hello everyone, I have been using Codeacademy for about a month now. I recently started doing the practice projects in Visual Studio Code then pasting my solution to Codeacademy. In sortSpeciesByTeeth I copied everything from the practice project to visual studio. Then I wrote what I thought was the solution but it was not sorting. I deleted everything then tried again same results. I decided to paste my solution into Codeacademy and it worked. Does anyone know what might be happening here?

I forgot to add. I also pasted the solution code from Codeacademy to visual studio and it does not work/sort.

I wouldn’t have thought there’d be a deprecation issue but it might be difficult to say what the problem is without code or a link to the lesson, adding a little more info would be good. Bumped this into javascript.

Here is the link to the lesson. I copied the solution to visual studio and it does not sort. Also I installed the latest version of nodejs version 16.14.2. I will try on another computer tonight when I get home.

Practice JavaScript Syntax: Arrays, Loops, Objects, Iterators | Codecademy

Tested on another computer. Windows 10 Pro, latest version of visual studio, and latest version of nodejs. Here is the output I get with visual studio using the solution from the lesson. Any ideas what is going on? I have also tested the lesson solution code on a few other javascript test sites and it does not work on those ether. I am starting to think there might a bug with this lesson but I am no expert.

Visual Studio Code Info
Version: 1.65.2 (user setup)
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:55.248Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
OS: Windows_NT x64 10.0.19044

Code output from lesson solution using Visual Studio Code
{ speciesName: ‘shark’, numTeeth: 50 },
{ speciesName: ‘dog’, numTeeth: 42 },
{ speciesName: ‘alligator’, numTeeth: 80 },
{ speciesName: ‘human’, numTeeth: 32 }

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