When HTML document has been completely loaded do the following:
create a function that would get hold of a selector using getElementById method and replace the text with the value from the “text” parameter.
Take the function declared above and assign it to replaceText constant.
Loop the elements from this array [‘chrome’ … etc, then use the function declared above to print out a text with the version of whatever property is dynamically accessed in this part of the program process.versions[dependency]
Then the function would do for each of the elements of the array:
for an element with id ‘chome-version’ I am going to put whatever value is inside process.versions.chrome.
for an element with id ‘node-version’ I am going to put whatever value is inside process.versions.node.
for an element with id ‘electron-version’ I am going to put whatever value is inside process.versions.electron.