Can you please take a look at this code and let me know how I can use the .each() to load each elements of array to the buttons?
var arr=["Left","Middle", "Right" ];
$("button").each(function(){
$(this).html(arr);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn btn-default">x</button>
<button type="button" class="btn btn-default">x</button>
<button type="button" class="btn btn-default">x</button>
</div>