$(function(){ const nounInput = $('#noun-input'); const verbInput = $('#verb-input'); const adjInput = $('#adjective-input'); const adverbInput = $('#adverb-input'); const sent = $('#sentence'); var nounDisplay = ""; var verbDisplay = ""; var adjDisplay = ""; var adverbDisplay = ""; $('#first').click(function(){ nounDisplay = nounInput.val(); }); $('#second').click(function(){ verbDisplay = verbInput.val(); }); $('#third').click(function(){ adjDisplay = adjInput.val(); }); $('#fourth').click(function(){ adverbDisplay = adverbInput.val(); sent.text("Do you " + nounDisplay + " your " + adjDisplay + " " + nounDisplay + adjDisplay + "? That's hilarious!") }); });