Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multi-line / Block comments are used when you need to comment on multiple lines that are placed together.
<script>
/* initialize and call a function
which takes users name in a variable
and welcome them on page */
function greetingMessage() {
var name = promp("Type your first name.");
document.write("Welcome to our page " + name + "!");
}
greetingMessage();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment