Declare a variable without initialization #2880
Denneisk
started this conversation in
Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Allow declaring a variable without needing to initialize its value, so you could do something like
Could error if the object is undefined before use,
Alternatively you could just secretly initialize it with the zero value.
The main benefit is that you don't have to guess/make a default value for special types that don't have a way to get a zero value (like functions currently).
Beta Was this translation helpful? Give feedback.
All reactions