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

What is !"".isEmpty? #1630

Open
1 of 2 tasks
whyamsx opened this issue Nov 25, 2024 · 1 comment
Open
1 of 2 tasks

What is !"".isEmpty? #1630

whyamsx opened this issue Nov 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@whyamsx
Copy link

whyamsx commented Nov 25, 2024

Checklist

  • I am reporting an issue in existing functionality that does not work as intended
  • I've searched for existing GitHub issues

Description

This is not the first time I have seen conditions like this in the source code: "".isEmpty or !"".isEmpty (example here).
Help me understand what this means and what it is for?

Yes, I created this question here because otherwise this secret cannot be solved.

Expected Behavior

At least something logical *literally at this moment I felt cognitive dissonance*

Actual Behavior

Obviously something is weird because this condition cannot be variable, the same as writing true or false.

@whyamsx whyamsx added the bug Something isn't working label Nov 25, 2024
@sreynan75
Copy link

hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants