首页 > 代码库 > 10-学习对象的好处

10-学习对象的好处

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<script>

    //1.生活中。(找对象)
    //2.编程中。(封装信息)
    function printStuInfo(name,age,address){
        console.log(name);
        console.log(age);
        console.log(address);
    }


    function printStuInfo(student){
        console.log(student.name);
        console.log(student.age);
        console.log(student.address);
    }


</script>
</body>
</html>

  

10-学习对象的好处