Vue练习十九:03_01_用typeof查看数据类型

Demo 在线地址:
https://sx00xs.github.io/test/19/index.html
---------------------------------------------------------------
ide: vscode
文件格式:.vue
解析:(待补)

<template>
  <div id="app">
<pre>
&lt;script type="text/javascript"&gt;
    alert(typeof 12345);    <span>//输出number</span>
    alert(typeof "abc");    <span>//输出string</span>
    alert(typeof document);    <span>//输出object</span>
&lt;/script&gt;
</pre>
  </div>
</template>
<script>
export default {
  created(){
    alert(typeof 12345);
    alert(typeof 'abc');
    alert(typeof document);    
  }
}
</script>

猜你喜欢

转载自www.cnblogs.com/sx00xs/p/11266054.html