JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" value="click" id="test" />

<div id="log"></div>

JavaScript

$('#test').click(function () {

    var str = 'Coming into the world on Elvis’ birthday with a doctor named Presley seemed fortuitous until, wielding the silvery smooth scalpel in his aged unsteady hand, the doctor sliced through the walls of my mother’s uterus and into my unborn skin. Inside the warm soothing waters of my mother’s womb, inside the silent weightlessness, I was safe. Then the prick of cold steel marked the first in a series of rude awakenings. I was scarred for life even before birth.';

    var arr1 = str.split(' ');
    while (arr1.length > 9) {
        var arr = [];
        for (var i = 0; i < 9; i++) {
            if (arr1[i].lastIndexOf('.') !== -1) {
                arr.push(arr1[i]);
                break;    
            } else {
                arr.push(arr1[i]);
            }        
        }
        
        arr1 = arr1.slice(arr.length, arr1.length);
        
        
        $('<span>' + arr.join(' ') + '</span><br />').appendTo($('#log'));
    }
    $('<span>' + arr1.join(' ') + '</span><br />').appendTo($('#log'));
});