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 7505375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:53:24+00:00 2026-05-29T21:53:24+00:00

How does define() treat traditional javascript files? For example, a.js define([‘b’, ‘c.js’, ‘d.js’], function(b){

  • 0

How does define() treat traditional javascript files?

For example,

a.js

define(['b', 'c.js', 'd.js'], function(b){ /* code */});

When does c.js or d.js get fetched and loaded? Will it be loaded and available in function(b){}?

I know that the order is not preserved. Will the order plugin help for this?
The docs say

It is not needed for scripts that use define() to define modules

but does that apply to traditional scripts as well?

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-05-29T21:53:28+00:00Added an answer on May 29, 2026 at 9:53 pm

    For plain Javascript files that do not define modules, they will be loaded and executed in arbitrary order. In your example above, there’s no guarantee that c.js will execute before d.js. But by the time your callback executes, both will be loaded.

    If you need c.js and d.js to execute in order, use the order plugin.

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

Sidebar

Related Questions

Does the main function we define in C or C++ run in a process
Why does the following code give me a segmentation fault? #define MAXROWS 10 #define
I am looking at some javascript code and it has this in a function:
Does anyone know if it possible to define the equivalent of a java custom
Does an auto-formatting tool exist for vi that'll allow me to define per language
While the C# spec does include a pre-processor and basic directives (#define, #if, etc),
Does anyone know how secure Wordpress is? I have no clue how to define
Does a char occupy 1 byte in a database? EDIT: If I define a
I want to define a class that supports __getitem__ , but does not allow
I want to define some Contact Groups. I am wondering where and how does

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.