<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
let str = ''
for (let i=1;i<=10;i++){
for (let j=i;j<=10;j++){
str = str + '*'
}
str = str + '\n'//加上一个换行符实现换行
}
console.log(str)
</script>
</body>
</html>