Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:20:08+00:00 2026-06-09T03:20:08+00:00

Can it be done? I have the following: populate.func = function(node, state) { return

  • 0

Can it be done?

I have the following:

populate.func = function(node, state) {
    return (new function(data) { /* stuff*/ });
}

However, calling populate.func invariably calls both the called function and the returned function, whether I use regular calling convention or the call method. I want to be able to call populate.func and just return the function as a value to make use of, without actually running it…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:20:10+00:00Added an answer on June 9, 2026 at 3:20 am

    just do this

    populate.func = function(node, state) {
        return (function(data) { /* stuff*/ });
    }
    

    Your code is instantiating a new object using your function as a constructor function, but you want to return a reference to your function instead, so just drop the new keyword.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I self-sign an iPhone application using Xcode? I have done the following:
I have an unordered tree. Each node represents a task that can be done
I have not done any animation stuff with iphone development so far. Can anybody
I have to group the data int the datagrid. I have done following for
In my content script I have done following : document.onreadystatechange = function(){ localStorage[options] =
I know this can be done and i have seen it done using some
I have done one program that allow user can listen to the music via
I have a query that I know can be done using a subselect, but
Hidden worksheets/workbooks have some limitations to what can be done in VBA code, like
I want to ensure I have done all I can to configure a system's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.