Click here to Skip to main content
14,449,862 members
Rate this:
Please Sign up or sign in to vote.
See more:
Use a function that will accept a Variable called my name as a parameter

The variable my name should be given the value of your first name

The function must be in JavaScript file called second.js. Your html page should be called second html

The function must return the message to be displayed.don't display the message inside the function.

What I have tried:

Function show(message) }
Window.alert (message);

window.alert ("click ok to see my name");
Show("my name is nelson");
Updated 9-Feb-20 10:38am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Read the instructions again: you have ignored most of already!
What should be the name of the parameter?
What should the parameter contain?
Where should the message be displayed (and more importantly, where should it not be displayed?

Just follow the instructions your tutor gave you - they are pretty explicit!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100