|
发表于 2017-8-8 15:29:34
|
显示全部楼层
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>无标题文档</title>
- </head>
- <title>鱼c工作室-Js的变量类型</title>
- <script type="text/javascript">
- var x=33;
- alert(x);
- alert(typeof x);
- x='i love fishc';
- alert(x);
- alert(typeof x);
- var y;
- alert(y);
- alert(typeof y)
-
- var a=[0,'a',null];
- alert(a);
- alert(typeof a);
- var z=null;
- alert(z);
- alert(typeof z);
- </script>
- <body>
- </body>
- </html>
复制代码
但是var a=[0,'a',null]这个里面好像不可以加null |
|