利用的是追加字符串的方式打印处理的
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>打印星星</title>
<script>
var str = '';
for (var i = 1; i <= 5; i++) {
str = str + '❤';
}
console.log(str);
</script>
</head>
<body>
</body>
</html>