javaScript-1 数据类型
javaScript 数据类型
<!DOCTYPE html> <html> <head> <title>javaScript 数据类型</title> </head> <body> <p id = "typeof"></p> <script> document.getElementById("typeof").innerHTML = "typeof \"test string\"->" +typeof "test string" + "<br>" + "typeof 1234567->"+typeof 1234567 + "<br>" + "typeof NaN->"+typeof NaN + "<br>" + "typeof true->"+typeof true + "<br>" + "typeof [1,2,3,4]->"+typeof [1,2,3,4] + "<br>" + "typeof {name:'jack ma', sex:'女',age:50}->"+typeof {name:'jack ma', sex:'女',age:50} + "<br>" + "typeof new Date()->"+typeof new Date() + "<br>" + "typeof function () {}->"+typeof function () {} + "<br>" + "typeof abc->"+typeof abc + "<br>" + "typeof null->"+typeof null; var Animal = function() { type:"cat"; name:"KT" }; var animal = new Animal(); console.log((animal instanceof Animal)) </script> </body> </html>
创作不易,转摘请标明出处。如果有意一起探讨测试相关技能可加博主QQ 771268289 博主微信:ding17121598
本文来自博客园,作者:怪圣卡杰,转载请注明原文链接:https://www.cnblogs.com/dwdw/p/16728196.html