码迷,mamicode.com
首页 > 其他好文 > 详细

10-学习对象的好处

时间:2017-03-19 14:01:04      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:title   lan   doctype   pre   ddr   highlight   lang   编程   name   

<!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-学习对象的好处

标签:title   lan   doctype   pre   ddr   highlight   lang   编程   name   

原文地址:http://www.cnblogs.com/sj1988/p/6579931.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!