Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
function validateDate(){ Date now = new Date(); //error here }
我得到并错误说预期的';' 当我宣布那条线时Date now =....
Date now =....
有谁知道为什么?
JavaScript 是弱类型的;所有变量声明都以关键字开头var:
var
var now = new Date();