這是一段代碼,我無法找到該錯誤,請幫我解決它。Javascript未捕獲的語法錯誤:意外的標識符
<script type="text/javascript">
var person={
first_name:"John",
last_name:"doe",
id:5577
fullName function(){
return this.first_name+" "+this.last_name;
}
}
document.getElementById('demo').innerHTML=person.fullName();
</script>
在這一行
谷歌顯示錯誤
fullName function(){
考慮使用諸如[ESLint](http://eslint.org/)或[JSHint](http://jshint.com/)等工具來幫助查找常見的輸入錯誤(以及可選地檢查您選擇的文體規則)。許多編輯至少有一個插件可以讓您在打字時給予反饋。 –
查看JavaScript教程:http://eloquentjavascript.net/04_data.html。 –