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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:09:25+00:00 2026-06-18T07:09:25+00:00

From RequireJS’s documentation (1.2.1), it has an example of simple name-value pair with no

  • 0

From RequireJS’s documentation (1.2.1), it has an example of simple name-value pair with no dependencies.

//Inside file my/shirt.js:
define({
    color: "black",
    size: "unisize"
});

It doesn’t have a return statement, so it doesn’t look like any other module could get the values.

How would I use this or access the values in here?

  • 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-18T07:09:26+00:00Added an answer on June 18, 2026 at 7:09 am

    If you were to include that module inside of another you would expose it’s contents:

    my/shirt.js:

    define({
        color: "black",
        size: "unisize"
    });
    

    shirtstore.js:

    define(["my/shirt"], function(shirt) {
        console.log(shirt.color);
        console.log(shirt.size);
    }
    

    Basically the contents of shirt.js become an object that you get access to when declaring that as a dependency of another module.

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

Sidebar

Related Questions

I'm trying to configure RequireJS to load jQuery from a different folder on my
How do you run a java program that requires input from a file in
What is a good strategy for stopping a requireJS module from loading from information
In the RequireJS example, it shows that you can reference a app.js (or whatever
I am trying to implement a simple Backbone app on top of RequireJS, but
Short and seemingly stupid question because so simple and you'd think ubiquitous: has anyone
1.3.0 — Jan. 11, 2012 Removed AMD (RequireJS) support from Underscore. If you'd like
I am upgrading a project from Dojo 1.6.1 using AMD and RequireJS to Dojo
I'm working on my first large-scale Backbone/RequireJS app, and I have a simple question.
From what I understand IMAP requires a connection per each user. I'm writing an

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.