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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:06:15+00:00 2026-06-04T01:06:15+00:00

In my project i have arrays for date1, date2 and so on upto one

  • 0

In my project i have arrays for date1, date2 and so on upto one month dates as shown below

var day1= [4,5,6,11];
var day2= [7,8,9,12];
var day3= [10,11,12,14];...

var day30= [1,2, 3, 4];

In the above each array exact size we dont know that may increase or decrease and i need to pass these values to the one more set of arrays like

var data1= [day1[0], day2[0], day3[0]];
var data2= [day1[1], day2[1], day3[1]];
var data3= [day1[2], day2[2], day3[2]];...

var data30= [day1[30], day2[30], day3[30]];

As per the day array size data array size will increase.

How to solve this issue any help..?

  • 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-04T01:06:16+00:00Added an answer on June 4, 2026 at 1:06 am

    Consider using an object instead of variables:

    var days = {
      day1: [4,5,6,11],
      day2: [7,8,9,12],
      ... 
      day30: [1,2, 3, 4]
    };
    

    Then you can do something like:

    var data30 = [];
    var i = 0;
    while ( days.hasOwnProperty('day' + ++i) ){
      data30.push(days['day' + i]);
    }
    

    Though given the sample data, data30 won’t have any members because the first array has no member at index 30.

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

Sidebar

Related Questions

I have a project that requires the following. Four arrays will be declared in
We have a project that needs to gather survey data. On one particular page
I am developing a project in android. I have five arrays of type String,
I have been messing around for a project I'm working on with arrays in
I have a one-off project where the company is auditing a small amount of
I have an array of DataRow objects in my C# project which I would
In my Values folder for my project, I have a string array named currency_avatar.
i have this JSON: var projects_array = new Array( {name:myName1, id:myid1, index:1}, {name:myName2, id:myid2,
My project have no visible error but when i try to run it gives
I want to apply NTFS-Search to our project. Our project have to find the

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.