<html>
<head>
<meta charset="utf-8">
<title>函数默认值应用</title>
</head>
<body>
<script type="text/javascript">
function connect({host = '127.0.0.1',username,port}){
console.log(host)
console.log(username)
console.log(port)
}
connect({
host:'www.baidu.com',
username:'zs',
port:3306
})
</script>
</body>
</html>