logo
logo

Append Element

Append Element

Write a function that takes a string parameter and appends it to a specified HTML element on the page.

The function should take two parameters: the first parameter is the string to be appended, and the second parameter is the ID of the HTML element to which the string should be appended.

For example, if the function is called with the string "Hello, world!" and the ID "output", it should append the string to the element with ID "output" on the page.

Console
Submit
Solution
00:00