Ad
  • Default 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

  • Default User Avatar

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

  • Default User Avatar

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