// Creates the text that we want to use into a ‘text node’ which can then be added to an element

var code = document.createTextNode(text);

After we have our text node, we create a new div element, pass in our code snippet (text node) as a child (which will then become the content of the div), we then give this newly created div an id of ‘example-code’.