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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:58:53+00:00 2026-06-10T22:58:53+00:00

I have an array done with values from some radio buttons, say myArray =

  • 0

I have an array done with values from some radio buttons, say myArray = ["1","40","35"];

every value has his counterparts, say for instance 1 = “men”, 2 = “women”, 40 = “red hairs”.

what’s the best method to build another array where every values gets his counterpart?

so something like that myBrandNewArray = ["men","red hairs", …];

I should store my couples into variables for some maintenance, like

var "1" = "men", "2" = "women", … ; 

but I don’t know if this is a good approach…

ps. even pointing me to some resources will be great. Thank you.

  • 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-10T22:58:55+00:00Added an answer on June 10, 2026 at 10:58 pm

    well, finally I did this:

    having

    var numericalArray = ["1","50","45", …]; 
    

    and

    var couples = { "50" : "homme",     
                "1" : "femme",
                "85" : "court",     
            …
                    };
    

    I can call this and get a new array with coupled values:

    function assignValues(numericalArray) {
    
    var verbalArray = [];
    
    for (var i=0; i<numericalArray.length; i++) {
    
        var value = numericalArray[i];
    
        verbalArray.push(couples[value]);  // right, I can't check if the values exists
    
    }
    
    console.log('here my new array:', verbalArray);
    
    
    }
    

    thanks to have me pointed on use of an object.

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

Sidebar

Related Questions

I have array of strings, String[] data and it's 10 elements has value P
I have a multidimensional array in which some values are present i want to
I have an Objective-C method which uses some x and y values from an
i have a NSMutableArray called delegate.allSelectedVerseEnglish from application delegate, it have some values, i
I have array of select tag. <select id='uniqueID' name=status> <option value=1>Present</option> <option value=2>Absent</option> </select>
Say we have array of arrays: tree_limbs = Array.new tree_limbs << %w(1 2 3
I have a PHP server script that SELECTs some data from a MySQL database.
I am relatively new to Objective C and need some array help. I have
I ll reframe my question based on some research I have done? I need
I have an array of values, t, that is always in increasing order (but

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.