Ad
  • Custom User Avatar

    @Roots2D:

    symbols.key(c) ensures that value 'c' has a proper matching key (an opening parenthesis).
    If it did have a proper opening parentheses, then symbols.key(c) would return true.

    If we didn't have it, then the block would return false if 'c' is anything other than an opening parenthesis.

    Hope this helps
    Let me know if you have any other questions

  • Custom User Avatar

    what is the significance of (if symbols.key(c) && symbols.key(c) != stack.pop) compared to (if symbols.key(c) != stack.pop)?

  • Custom User Avatar

    thank you el cortez! i wish every questions had an explanation.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution