Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Need explanation with javascript functions
Timothy Sam
Ranch Hand
Posts: 751
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi, I asked this a long time ago... I already forgot so I'm asking again...
How does
var myVar = myFunction();
differ from...
var myVar = myFunction;
thanks...
SCJP 1.5
Eric Pascarello
author
Posts: 15385
6
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Runs function and stores value into myVar
var myVar = myFunction();
Stores the function into the variable myVar
var myVar = myFunction;
You would be able to do
myVar(); and it will execute the function store in it.
Eric
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Inheritance Variable assignment
javascript passing value to JSP
calling $(document).ready() from else where
Session Attribute Values Fom JS
c:remove does not remove from all scopes
More...