Skip to main content
Rollback to Revision 1
Source Link
PKS
  • 791
  • 1
  • 10
  • 23

typeof type of can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}

typeof can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}

type of can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}
fix keyword
Source Link
shriek
  • 5.9k
  • 8
  • 53
  • 84

type oftypeof can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}

type of can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}

typeof can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}
Source Link
PKS
  • 791
  • 1
  • 10
  • 23

type of can be used for this

if (typeof abc === "number") {
    // number
} else if (typeof abc === "string"){
//string
}