<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kaan</title>
    <description>The latest articles on DEV Community by kaan (@kaan09714823).</description>
    <link>https://dev.to/kaan09714823</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F577036%2Fb9bf761b-387c-486c-8d45-11adb915565c.png</url>
      <title>DEV Community: kaan</title>
      <link>https://dev.to/kaan09714823</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaan09714823"/>
    <language>en</language>
    <item>
      <title>Save function parameter to a global array incoming from socket.on in node.js .why it only save the last element of the data</title>
      <dc:creator>kaan</dc:creator>
      <pubDate>Wed, 10 Feb 2021 12:26:36 +0000</pubDate>
      <link>https://dev.to/kaan09714823/save-function-parameter-to-a-global-array-incoming-from-socket-on-in-node-js-why-it-only-save-the-last-element-of-the-data-48k</link>
      <guid>https://dev.to/kaan09714823/save-function-parameter-to-a-global-array-incoming-from-socket-on-in-node-js-why-it-only-save-the-last-element-of-the-data-48k</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    var corona = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]];

    var lastclient;


    socket.on("playedemitbuy", function (veri) {

     lastclient= veri.lastclient;

      console.log("writedata :"+lastclient);


      corona[lastclient][veri.playedbuy] = 5;

    console.table(corona); //why does it not print all incoming data ?


        });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>node</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
