Given an input string, how can we identify the data type of its content in Javascript?

前端 未结 0 460
夕颜
夕颜 2021-01-25 18:32

For example, let th efunction be typeIdentifier(), therefore:

typeIdentifier(\'123\') //Number
typeIdentifier(\'Hello\') //String
typeIdentifier(\'20         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题