Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.00/5 (1 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");
<pre>script</pre>
Posted
Updated 9-Feb-20 9:38am

1 solution

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!
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900