I have a variable.

abc:number|string;

How can I check its type? I want to do something like below:

if (abc.type === "number") {
    // do something
}

8 Answers
8

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *