JSFiddle - React, Tailwind, and code Playground

by Brock Callahan

HTML

<div id="print"></div>

JavaScript

var quotes = [
    "Concentration of the mind is in a way common to both Knowledge and Yoga. Yoga aims at union of the individual with the universal, the Reality. This Reality cannot be new. It must exist even now, and it does exist.",
    "All activities and events that a body is to go through are determined at the time of conception.",
    "You need not aspire for or get any new state. Get rid of your present thoughts, that is all.",
    "Silence is also conversation.",
    "The body dies, but the spirit that transcends it cannot be touched by death.",
    "All bad qualities centre round the ego. When the ego is gone, Realisation results by itself. There are neither good nor bad qualities in the Self. The Self is free from all qualities. Qualities pertain to the mind only.",
    "Our own self-realization is the greatest service we can render the world.",
    "Mind is consciousness, which has limitations. We are originally unlimited and perfect. Later on we take on limitations and become the mind.",
    "Meditation depends upon the strength of mind. It must be unceasing even when one is engaged in work. Particular time for it is meant for novices.",
    "The mind is only a bundle of thoughts. The thoughts have their root in the I-thought. Whoever investigates the True “I” enjoys the stillness of bliss.",
    "When the mind is left without anything to cling to, it becomes still.",
    "There is no mind to control if you realize the self. The mind having vanished, the self shines forth. In the realized man, the mind may be active or inactive, the self remains for him."
]

function getRandomNumber(upper) {
    var num = Math.floor(Math.random() * upper) + 1;
    return num;
}

function writeIt(id, text) {
    document.getElementById(id).innerHTML = text;
}

var quoteNum = getRandomNumber(11); 
writeIt('print', quotes[quoteNum]);