JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container">
<div id="images"></div>
</div>

CSS

#container {
 width:600px;
 height:600px;
 background-color:#000;
 }

.roll {
    margin:4px;
  }

JavaScript

var gallery= new Array();

gallery[0]="http://s6.tinypic.com/1zd1a47_th.jpg";
gallery[1]="http://s6.tinypic.com/2ngh9ty_th.jpg";
gallery[2]="http://s6.tinypic.com/29zy5qf_th.jpg";

var x = $("#images");

function displayAllImages() {
    var i = 0,
        len = gallery.length;        
    for (; i < gallery.length; i++) {
        		
       x.append("<div><img class='roll' src='" + gallery[i] + "'></div>");
    } 
};
	
$(function() {
    displayAllImages();
});