Basic Javascript: Profile Lookup - for of loop doesn't work

I suppose the tests can’t handle for…of loops:

It works in different IDEs though: Edit fiddle - JSFiddle - Code Playground

Please provide a link to the challenge in question and please don’t provide pictures of code - please cut and paste the code.

ReferenceError: obj is not defined

You never declare obj - in strict mode that throws an error.

This:

for (const obj of contacts) {

works.

i would sugest just using the ‘get help’ link and linking to your FCC IDE/code here. it auto sets up the post for you and makes it easier to get a response here. (you gotta pass the FCC test suite/IDE anyways)

1 Like

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