chapter1
name:
<html>
<body>
<p>creat a new JavaScript Object. </p>
<p id="demo"> </p>
<script>
var person ={firstNmae:"John", lastName:"Doe", age:50, eyecolor:"blue"};
document.getElementById("demo").innerHTML = person,firstName + "is" +person.age +"year old.";
</script>
</body>
</html>
chapter3
name:onclick
<html>
<body>
<p> click the button to use the function </P>
<butotn onclick="myFunction(‘Harry Potter','Wizard')">click here <button>
<script>
function myFunction(name,job)
{
alert("Welcome " +name+", the" +job);
}
</scrpit>
</body>
</html>