[Firefox Specific Issue] FCC's compiler not working as intended while using .length

Tell us what’s happening:

Well I’m sure my last line’s code is correct, yet your compiler insists I’m wrong. Have a look.

Your code so far


// Example
var firstName = "Ada";
var lastLetterOfFirstName = firstName[firstName.length - 1];

// Setup
var lastName = "Lovelace";

// Only change code below this line.
var lastLetterOfLastName = lastName[lastName.length - 1];

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0.

Challenge: Use Bracket Notation to Find the Last Character in a String

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string

The cose is indeed correct,

It may be your local environment (browser, device) to case issues, sometimes it happens.
Try making the challenges on Google Chrome and / or hard refresh the page, sometimes challenges hangs and usually a refresh is all it takes.

Hope this helps :+1:

3 Likes

The culprit turns out to be Firefox 72.1.

Switching to a Chromium-Based browser made it work like a charm. Good looks @Marmiz

@harvard historically many challenges have been bugged for Firefox :frowning:
So If you don’t mind switching, I suggest you use Chrome throughout the challenges.

Good luck and happy coding :sparkler:

Thank you for clarifying. Could you edit your subject line to reflect it’s a browser issue? Could help others

Sure thing man. I’ll go ahead and mark it.

1 Like