The difference between document.write() and and document.writeln() is document.writeln() appends data and a newline to data. It appears that it for the following 4 functions, document.writeln() adds a space after the first function while document.write() does not!