Back
You can use typeof to check for the value of an object like this:
typeof yourVariable === 'object' && yourVariable !== null
I hope this will help.
Want to know more about Java? Prefer this tutorial on Java Tutorial.
Want to become a Java Expert? Join Java Course now!!
31k questions
32.8k answers
501 comments
693 users