变量先声明再赋值,关于 mynum跟mychar
先声明再赋值是这样写var mychar;
mychar="javascript";
var mynum = 6;
为什么任务赋值8,我这样写也对<script type="text/javascript">
var mychar;
mychar="javascript";
var mychar=8;
</script>
先声明再赋值是这样写var mychar;
mychar="javascript";
var mynum = 6;
为什么任务赋值8,我这样写也对<script type="text/javascript">
var mychar;
mychar="javascript";
var mychar=8;
</script>
2015-12-25
举报