Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <b>Array1</b>
  <ul id="array1"></ul>
  <br>
  <b>Array2</b>
  <ul id="array2"></ul>
</body>
</html>
 
$(function(){
var array = ['123.456789,123.1','456.7890123,234.1','789.0123456,345.1'];
var array1 = [], array2 = [];
for(var i=0; i<array.length; i++){
  array1[i] = array[i].split(",")[0];
  array2[i] = array[i].split(",")[1];
}
  
  
  /* Not necessary, just testing */
  for(var j=0; j<array1.length; j++){
    $("#array1").append("<li>" + array1[j] + "</li>");
  }
  
  for(var k=0; k<array2.length; k++){
    $("#array2").append("<li>" + array2[k] + "</li>");
  }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers