title: How to provide the array objects of one event handler to another event handler as input in javascript?
body: <p>This is the click event. It has the Array Objects and i want to provide these objects to another event handler. How is this possible?</p>
  
  <pre><code>$("#newQuiz_div #modalbody #next").click(function(){
      var qno=$("#question").val();
      var groupname=$("#groupname").val();
      var duration=$("#duration").val();
  
      var ht='';
      qno++;
      $("#question").val(qno);
      $("#nextQuestion").removeClass("hide");
      ht+=$("#nextQuestion ul").html();
      ht+=('&lt;li&gt;'+qno+'&lt;i class=icon-edit&gt;&lt;/i&gt;&lt;i class=icon-remove&gt;&lt;/i&gt;&lt;/li&gt;');
      $("#nextQuestion ul").html(ht);
      //$("#text").val(" ");
      alert("helooo");
      alert(qno);
  
      var questionNo=new Array(10);
      var qType=new Array(10);
      var text=new Array(10);
      var Coption=new Array(10);
      var CoptionM=new Array(10);
  
      var qn=0;
      var q=0,qt=0;
      var cop=0,copm=0;
  
      if($("#qType").val()==2)
      {
          alert("hiii");
          questionNo[qn]=$("#question").val();
          qType[qt]=$("#qType").val();
          text[q]=$("#text1").val();
          CoptionM[copm]=$("#cOptionM").val();
          alert("Question type:"+questionNo[qn]);
          alert("Question type:"+qType[qt]);
          alert("Question :"+text[q]);
          alert("Answer :"+CoptionM[copm]);
  
          qn++;
          qt++;
          q++;
          copm++;
          $("#text1").val(" ");
      }
      else
      {
          alert("nooo");
          questionNo[qn]=$("#question").val();
          qType[qt]=$("#qType").val();
          text[q]=$("#text").val();
          Coption[cop]=$("#cOption").val();
          alert("Question type:"+questionNo[qn]);
          alert("Question type:"+qType[qt]);
          alert("Question :"+text[q]);
          alert("Answer :"+Coption[cop]);
  
          qn++;
          qt++;
          q++;
          cop++;
          $("#text").val(" ");
      }
  
  });
  </code></pre>
  
  <p>I want to add another event handler named <code>$("#btnSave").click(function(){});</code></p>
  
  <p>How this Event can access the Array objects created in above Event handler?</p>