JSFiddle - React, Tailwind, and code Playground

by akang2

HTML

<p id="word">Hey guy</p>
<br />
<p>        
<p id="word1">
    </p>
    <br />
<p id="word2">
    uh
    </p>

JavaScript

//Timing methods and String concatenation

//create the variables
var first='Hey ';
var second='I know ';
var third='you ';

//concatenate the variables
var fourth=first.concat(second,third);

//the function to be put into the setInterval method
function writeIt (){
    document.getElementById('word').innerHTML='Juanitaaaaaa' +'<br />';
}

function writeIt2() {
    document.getElementById('word1').innerHTML=fourth;
}

//using the setInterval methods and attaching them to variables
//var repeat=self.setInterval(writeIt,1000);
//var repeat2=setInterval(writeIt2,2000);
    
var user=prompt('Gimme yer name','right here');
var bleh=user.charAt(0);
    
    
document.getElementbyId('word').innerHTML=bleh;