Finally, code = username; to update the content of the paragraph.

<html>
<body>
  <p id="name">JohnnyG</p>
  <p id="age">25</p>
  <button onclick="generate()">Generate a username</button>
  <p id="username"></p>
  <script>
function generate() {
var name = document.getElementById("name").innerHTML;
var age = document.getElementById("age").innerHTML;

var username = name + "_" + age;
document.getElementById("username").innerHTML = username;
}

</script>
</body>
</html>
]]>

Great work! Hit the button to see the function in action.

Make sure to code = username.