Answers for "check if arg is string ja"

0

check if arg is string ja

if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
Posted by: Guest on September-15-2021

Browse Popular Code Answers by Language