Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <h1> Hello </h1>
</body>
</html>
 
function getStockSymbols(stocks){
  var symbols = [];
  var counter;
  
  for (counter= 0; counter < stocks.length; counter++){
    stock = stocks[counter];
    symbols.push (stock.symbol);
  }
  
  return symbols;
}
var symbols = getStockSymbols([
  {symbol :"XYZ", price : 240.22, volumne : 23434},
  {symbol :"TRE", price : 340.22, volumne : 33434},
  {symbol :"POI", price : 440.22, volumne : 43434}
]);
console.log(JSON.stringify(symbols));
Output

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

Dismiss x
public
Bin info
adhulappanavarpro
0viewers