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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:20:27+00:00 2026-05-30T00:20:27+00:00

trace (suallar); – is written 2 times 1st time – HERE IT SHOWS ALL

  • 0

trace (suallar); – is written 2 times
1st time – HERE IT SHOWS ALL THE ELEMENTS OF THE ARRAY suallar
2nd time – BUT HERE THIS ARRAY SEEMS TO BE EMPTY, EVEN THOUGH I DIDN’T MANIPULATE WITH IT OR MAKE IT EQUAL TO ANYTHING I MANIPULATE WITH IN BETWEEN

var suallar:Array = new Array();
var i:int;
var cavablar:Array=new Array();

suallar.push(["sual1", "duz1", "sehv11", "sevh12", "sevh13","sevh14"]);
suallar.push(["sual2", "duz2", "sehv21", "sevh22","sevh23","sevh24" ]);
suallar.push(["sual3", "duz3", "sehv31", "sevh32","sevh33","sevh34"]);
suallar.push(["sual4", "duz4", "sehv41", "sevh42","sevh43","sevh44"]);
suallar.push(["sual5", "duz5", "sehv51", "sevh52","sevh53","sevh54"]);



var cavablar_temp:Array = suallar.concat();

for (i=0; i<suallar.length; i++){
    cavablar_temp[i].shift();
}

trace (suallar);


for (i=0; i<suallar.length;i++){

var number_array:Array = cavablar_temp[i];

var final_array:Array = [];

var count_selected:int = 5;
for (var u = 0; u < count_selected; u++)
{
    if (number_array.length == 0)
    {
        break;
    }
    else
    {
        final_array.push(number_array.splice(Math.floor(Math.random() * number_array.length), 1)[0]);

    }   

}
    cavablar.push(final_array);}

trace(cavablar.join("\n"));

trace (suallar); 
  • 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-30T00:20:30+00:00Added an answer on May 30, 2026 at 12:20 am

    As per the Array.splice() documentation:

    Adds elements to and removes elements from an array. This method modifies the array without making a copy.

    When you do number_array.splice() in the middle of your loop, you’re modifying the original arrays you pushed to suallar.

    Take a look at Array.slice(), which returns a new array without modifying the original.

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

Sidebar

Related Questions

Stack Trace Picture of stack trace here Values aren't being passed to the other
is it possible to trace all exceptions in Tomcat server (or, in general, JVM)?
I can't trace whats inside holderMC, and its content. What's wrong here? instance.text=something holderMC.addChild(instance)
I want to trace all the parent controls of a control (e.g) if i
I want to trace the source code , but when I set a breakpoint,
Possible Duplicate: trace() not written to flashlog.txt I am trying to log flash trace
Why would a stack trace show line 0, but only for one frame in
In my trace I see stored procedures calls in my text data like this:
How do I trace all of the data from an XML file that was
I have to trace all outcome When tossing four coins at once public void

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.