JSFiddle - React, Tailwind, and code Playground

HTML

<ol id="heights"></ol>

JavaScript

/*globals $ */

var heights = [];

heights.push($(window).height());
$(function() {
    heights.push($(window).height());
});
$(window).on('load', function() {
    var i, $li;
    heights.push($(window).height());

    for (i = 0; i < heights.length; i += 1) {
        $li = $('<li></li>', {
            text: heights[i].toString()
        });
        $('#heights').append($li);
    }
});