SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=, initial-scale=">
	<meta http-equiv="X-UA-Compatible" content="">
	<title></title>
</head>
<body>
	<script>
        function fn(n) {
            return new Promise(function(resolve,reject){
                if(n) {
                    resolve('有参数')
                } else {
                    reject('无参数')
                }
            })
        }
        fn(1).then(console.log)
        fn()
        // .then(console.log)
        .catch(console.log)
        
    </script>
</body>
</html>