Uncaught Reference error :my function is not defined

i have written a code to create a button to display the name when it is clicked. But when i run it it showing this error

can you show your code you have written

This the HTML code


This is the function in javascript

hi @skdr369
first of all you have to write the same id in the document.getElementById() that you have given to the paragraph.second, there will be no ‘;’ after the name of function in the onclick() function.

Thank you i have got the output