Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Repl.it #4

Closed
9 tasks
astania opened this issue Oct 21, 2021 · 1 comment
Closed
9 tasks

Error in Repl.it #4

astania opened this issue Oct 21, 2021 · 1 comment
Assignees
Labels
se curriculum Issue for lessons in the Software Engineering program

Comments

@astania
Copy link

astania commented Oct 21, 2021

Link to Canvas

https://learning.flatironschool.com/courses/4599/pages/traversing-nested-objects?module_item_id=310239

Issue Subtype

  • Master branch code
  • Solution branch code
  • [x ] Code tests
  • Layout/rendering issue
  • Instructions unclear
  • Other (explain below)

Describe the Issue

Source

function deepIterator(target) {
    console.log("Argument: ", target);
    if (typeof target === 'object') 
      for (const key in target) {
        deepIterator(target[key]);
      }
    } else {
      console.log("Logged value: ", target);
    }
  }

  const numbers = [1, [2, [4, [5, [6]], 3]]];

  deepIterator(numbers);

Concern

This code (in the only repl.it that's embedded in this lesson) is throwing an error when you press the play button:

/home/runner/nTEslcnQ1ia/index.js:7
} else {
^^^^

SyntaxError: Unexpected token 'else'

(Optional) Proposed Solution

What OS Are You Using?

  • OS X
  • [x ] Windows
  • WSL
  • Linux
  • IllumiDesk

Any Additional Context?

@ihollander ihollander added the se curriculum Issue for lessons in the Software Engineering program label Oct 25, 2021
@lizbur10
Copy link
Contributor

Hi @astania. Hmm, strange - it's working fine for me. You might want to try clicking "open in replit" in the upper right corner of the repl.it window and see if it works there. Otherwise you can post a question in the 'js-prework-support' Slack channel to get help with this. Sorry you're having problems!

Since I'm not able to recreate the problem I'm going to go ahead and close this issue. 💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
se curriculum Issue for lessons in the Software Engineering program
Projects
None yet
Development

No branches or pull requests

4 participants