Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can anyone help me?

Status
Not open for further replies.

wow262

Programmer
Mar 21, 2012
2
US
I need to create a variable divide and set it equal to an anonymous function. The function takes two arguments and divides the first argument by the second argument.

Code should look like this...

var divide = function(a, b) {
//your code goes here
}



Thank you all.
 
Hi

JavaScript:
[b]var[/b] divide [teal]=[/teal] [b]function[/b][teal]([/teal]a[teal],[/teal] b[teal])[/teal] [teal]{[/teal]
  [highlight][b]return[/b] a [teal]/[/teal] b[/highlight]
[teal]}[/teal]

Feherke.
 
Is this a school assignment? If so, please read the posting policies.

mmerlinn


Poor people do not hire employees. If you soak the rich, who are you going to work for?

"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top