当前位置:网站首页>Judge the data type of JS
Judge the data type of JS
2022-06-21 09:14:00 【Tie Hanhan plus】
Use Object.prototype.toString.call() To determine the array 、 object 、 character string 、 Numeric and Boolean types
Object.prototype.toString.call(1)
// "[object Number]"
Object.prototype.toString.call('string')
// "[object String]"
Object.prototype.toString.call(false)
// "[object Boolean]"
Object.prototype.toString.call({
})
// "[object Object]"
Object.prototype.toString.call([])
// "[object Array]"
边栏推荐
- R language through rprofile Site file, custom configuration of R language development environment startup parameters, shutdown parameters, configuration of R startup output custom text and system time
- Nodejs post request JSON type and form type
- Three key directories in R language and their corresponding priorities: R_ Home directory, user directory, current working directory, files read by R's startup process
- R language obtains help information of global, package and function: use the rsitesearch function to search the information of the specified package or function in the R community help manual and arch
- Topic34——31. 下一个排列
- SQL to check the disk usage of the database / table, kill the process and terminate the connection in tidb
- Dumpling备份数据库
- 1. is god horse a meta universe?
- Introduction to list operation in C #
- Topic34——31. Next spread
猜你喜欢

Abstractqueuedsynchronizer (AQS) source code analysis - cyclicbarrier source code analysis

The internal structure of MySQL and how an SQL statement is executed

The difference between tuples and lists

【VS】【使用问题】【解决方案】VS2010打开一直停留在启动界面

Binary search (integer binary)

Storage of floating point numbers in C language in memory

Request and response must know

1. is god horse a meta universe?

Six methods of optimizing inventory management in food production industry

【实战】STM32MP157开发教程之FreeRTOS系统篇6:FreeRTOS 列表和列表项
随机推荐
Stm32mp1 cortex M4 development part 12: expansion board vibration motor control
Merge sort of sorting
adb使用技巧和usb通信原理
The internal structure of MySQL and how an SQL statement is executed
Verification code ----- SVG captcha
Topic34——31. Next spread
An app developed based on retrotfit2.1+material design+ijkplayer
优化食品生产行业库存管理的6种方法
Six methods of optimizing inventory management in food production industry
Summary of Web automated testing
Stm32mp1 cortex M4 development part 10: expansion board nixie tube control
Markdown basic syntax
Talking about Festinger effect
[Mgt] model Mgt for code interpretation
Dumpling備份數據庫
【C】【时间操作】C语言中关于时间的操作
leetcode:19. 删除链表的倒数第 N 个结点
R language uses the < - operator to create a new variable, uses the existing data column (sum, mean) to create a new data column, uses the ifelse function or conditional judgment to create a discrete
C#中的list操作入门
tidb4.0.0遇见的问题、报错总结(tiup部署)