なぜだろう
console.log(document.createElement("p").appendChild(document.createTextNode("some text")));
戻る
<TextNode textContent="some text">
ファイアーバグで?
なぜだろう
console.log(document.createElement("p").appendChild(document.createTextNode("some text")));
戻る
<TextNode textContent="some text">
ファイアーバグで?
appendChild関数をあなたに連鎖させたのでcreateElement、それが返すものはすべて最後の戻り値になります。あなたのconsole.logステートメントは、その最後の戻り値を記録します。
.appendChild()は、追加された子を返します