Skip to content

Conversation

crimx
Copy link
Contributor

@crimx crimx commented Mar 12, 2025

Safely check existent of app

@phoneticallySAARTHaK
Copy link
Contributor

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

@crimx
Copy link
Contributor Author

crimx commented Mar 12, 2025

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

Not app has undefined value. app is not defined. Referencing an undefined(not defined) throws an Uncaught ReferenceError: app is not defined error.

@Gerrit0 Gerrit0 merged commit 5eaa109 into TypeStrong:master Mar 15, 2025
8 checks passed
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 15, 2025

Thanks!

@phoneticallySAARTHaK
Copy link
Contributor

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

Not app has undefined value. app is not defined. Referencing an undefined(not defined) throws an Uncaught ReferenceError: app is not defined error.

I learn more of JS everyday

@zaysayd
Copy link

zaysayd commented Mar 15, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants