function writeSearchHistory(array) {
    $.each(array, function (i) {
        createHistoryButton(array[i]);
    })
}
// function to write search history and calls the createHistoryButton to create previous search buttons.
function to write search history and calls the createHistoryButton to create previous search buttons.
function to write search history and calls the createHistoryButton to create previous search buttons .
function writeSearchHistory(array) {
    $.each(array, function (i) {
        createHistoryButton(array[i]);
    })
}
function writeSearchHistory ( array ) { $ . each ( array , function ( i ) { createHistoryButton ( array [ i ] ) ; } ) }
function to write search history and calls the createHistoryButton to create previous search buttons.
function to write search history and calls the createHistoryButton to create previous search buttons .