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

  • SEARCH
  • Home
  • 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 8102067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:08:32+00:00 2026-06-05T23:08:32+00:00

I have two functions here function Preloader() {} Preloader.prototype = { init:function() { //

  • 0

I have two functions here

function Preloader() {}
Preloader.prototype = {
    init:function() {
        // do something
    }
}

var preloader = new Preloader();

function Project() {}
Project.prototype = {
    init:function() {
        // do something else 
    }
}

var project = new Project();

I want to call project.init() in preloader’s init function but obviously

project.init()

doesn’t work ’cause there’s no project variable in preloader. How should I call it? Thanks!

  • 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-05T23:08:33+00:00Added an answer on June 5, 2026 at 11:08 pm
    Preloader.prototype = {
        init:function(project) {
            project.init();
        }
    }
    
    var preloader = new Preloader(),
        project = new Project();
    
    preloader.init(project);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two functions here say animation1 and load1 they work like that: function
I am just trying something with somebody else's code. I have two functions: int
Here's my send email function that sends the email however i have two different
I have two functions: Function 1: ImageToByteArray: Is used to Convert an Image into
I have two functions in an ActionScript class, they are: private function loaderCompleteHandler(event:Event):void {
I have two functions hooked on the submit event of a form. Each function
i have two functions, the parent function is __triggerAction, than child function is __triggerNormal
I am trying to call two javascript functions on single events. Here is my
Scenario: Let's say for example, I have two functions. First function is concerned with
I have two simple functions to set and clear cookie. private function _setCookie($value =

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.