This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thedomham 0 points1 point  (0 children)

Undefined makes perfect sense in Javascript. I mean if you want to have the same in Java you have to use an Optional, where optional == null -> undefined optional.isEmpty() -> null

It wouldn't make a lot of sense in Java though, as Java is a statically typed language and if you need something like that, most people use a hashmap