这是Class.js文件
var com;
if(!com)com={};
else if(typeof com !="object")
{
    throw new Error("com is exists")
}
if(com.Class)
{
    throw new Error("com.Class is exists");
}
com.Class={
    define:function(){return new Date()},
    provides:function(){return new Date().getDate()}
};web页面<script type="text/javascript">
        var com;
        if(!com||!com.Class)
        {
            throw new Error("Class is not exists");
        }
        alert(com.Class.define())
</script>
这里不明白为什么书上说,一定要有var com;这个定义呢?高手指教下