diff --git a/Web/test8/opreaArr.html b/Web/test8/opreaArr.html index bb99a52..4250624 100644 --- a/Web/test8/opreaArr.html +++ b/Web/test8/opreaArr.html @@ -31,9 +31,10 @@ // 定义一个函数displayOutput,用于将数组元素以字符串形式展示在h1标签中 const displayOutput = (a) => { - return a.join(" "); + output.innerText += "displayOutput(): " + a; } - output.innerHTML += "displayOutput(): " + displayOutput(numbers) + "
"; + displayOutput(numbers); + output.innerHTML += "
"; // 将doubledoutput数组中的元素以字符串的形式显示在h1标签中 output.innerHTML += "doubledoutput: " + doubledOutput + "
";