JSFiddle - React, Tailwind, and code Playground

by Sherali Turdiyev

HTML

<div class="smallbox">
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
    <input type="text"/>
</div>

CSS

.smallbox{
    
}
.smallbox input{
    
    width:160px;
}

JavaScript

var sudoku_array = ['1', '2', '3', '4', '6', '5', '7', '8', '9'];
$('.smallbox input').each(function (index) {
    $(this).val(sudoku_array[Math.floor(Math.random() * sudoku_array.length)]);
});