How to display text after a certain period of time?

Good evening.
Wanted the script output after 3 seconds "Hello" and a second later attributed to "world!". Wanted to implement using setInterval and setTimeout, but not out.

spoiler
var a = 'Hello';
var b = ' world!<br>'

setInterval(testOne, 3000);
function testOne(){
document.write(a);
 setTimeout(document.write(b), 1000);
}
April 3rd 20 at 17:29
1 answer
April 3rd 20 at 17:31
Solution
var a = 'Hello';
var b = ' world!<br>'

setTimeout(testOne, 3000);

function testOne() {
document.write(a);
 setTimeout(function () {
document.write(b);
 }, 1000);
}

Find more questions by tags JavaScript