Similar to the innerText property and the appendChild() method,
This method can provide a lot of flexibility when inserting text into your HTML document as it has four possible positions of insertion: beforebegin, afterbegin, beforeend and afterend.
In this video I’ll take you through a demonstration of how this method works – it’s really easy and I encourage you to use it in your next web project!
Support me on Patreon:
– with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
Follow me on Twitter @dcode!