Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
1 of 4
Talha
  • 19.3k
  • 8
  • 53
  • 66

Try this

if (objectName instanceof Object == false) {
  alert('Not an object');
}
else
{
alert('An object');
}
Talha
  • 19.3k
  • 8
  • 53
  • 66