SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: scope confusion

  1. #1
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    scope confusion

    Made a really stupid error so I deleted that part but I still have this question

    I'm coming from another language so I'm a bit unclear on passing functions. Are they passed by value or by reference?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    functions are passed by reference

    See: JavaScript: Passing by Value or by Reference
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    functions are passed by reference

    See: snook.ca/archives/javascript/javascript_pass"]JavaScript: Passing by Value or by Reference
    Thanks. That's almost more than I wanted to know, but at least I'll know where to go when a function pass doesn't work the way I thought it would

    Jim


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •