2

#yyds干货盘点# 前端歌谣的刷题之路-第二十二题-基本数据类型检测

 1 year ago
source link: https://blog.51cto.com/u_14476028/5568994
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

#yyds干货盘点# 前端歌谣的刷题之路-第二十二题-基本数据类型检测

原创

请补全JavaScript函数,要求以字符串的形式返回参数的类型。
注意:只需检测基本数据类型。

#yyds干货盘点# 前端歌谣的刷题之路-第二十二题-基本数据类型检测_html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>检测数据类型</title>
</head>
<body>
<script>// 请补全JavaScript函数,要求以字符串的形式返回参数的类型。注意:只需检测基本数据类型。
function _typeof(value) {
// 补全代码
return typeof</script>
</body>
</html>

考察typeof的使用 直接return即可


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK