// Refer to UI elements
var button = document.getElementById(\'MyButton\');
var txtInput = document.getElementById(\'MyInputText\');
// Bind click event of the button with an event listerner
button.addEventListener(\'click\', function () {
\'use strict\';
var text = txtInput.value;
// Show alert box with this text
window.alert(text);
})();