newClickerPurchase(name, cost, rate) {
            if (
                typeof name !== 'string' ||
                typeof cost !== 'number' ||
                typeof rate !== 'number'
            ) {
                throw new Error('New purchase item for clicker bar invalid')
            }

            const clickerButton = document.createElement('button')
            clickerButton.appendChild(
                document.createTextNode(
                    name +
                        '. ' +
                        'Cost: ' +
                        cost +
                        ' clicks. ' +
                        rate +
                        ' click/s'
                )
            )
            clickerButton.className = 'clickerbutton'

            clickerButton.onclick = () => {
                this.buy(cost, rate)
            }
            this.HTMLreference.appendChild(clickerButton)

            return { HTMLreference: clickerButton, rate: rate, cost: cost }
        }
/**
         * Creates a new item that can be purchased with clicks
         * @param {string} name - Name of the item
         * @param {number} cost - Cost of the item in clicks
         * @param {number} rate - Rate of click production of the item in clicks/second
         * @returns An object containing the button's HTML reference, the rate, and cost of the item.
         */
Creates a new item that can be purchased with clicks
@param {string} name - Name of the item
@param {number} cost - Cost of the item in clicks
@param {number} rate - Rate of click production of the item in clicks/second
@returns An object containing the button's HTML reference, the rate, and cost of the item.
Creates a new item that can be purchased with clicks @param { string } name - Name of the item @param { number } cost - Cost of the item in clicks @param { number } rate - Rate of click production of the item in clicks / second @returns An object containing the button ' s HTML reference the rate and cost of the item .
newClickerPurchase(name, cost, rate) {
            if (
                typeof name !== 'string' ||
                typeof cost !== 'number' ||
                typeof rate !== 'number'
            ) {
                throw new Error('New purchase item for clicker bar invalid')
            }
            const clickerButton = document.createElement('button')
            clickerButton.appendChild(
                document.createTextNode(
                    name +
                        '. ' +
                        'Cost: ' +
                        cost +
                        ' clicks. ' +
                        rate +
                        ' click/s'
                )
            )
            clickerButton.className = 'clickerbutton'
            clickerButton.onclick = () => {
                this.buy(cost, rate)
            }
            this.HTMLreference.appendChild(clickerButton)
            return { HTMLreference: clickerButton, rate: rate, cost: cost }
        }
newClickerPurchase ( name , cost , rate ) { if ( typeof name !== 'string' || typeof cost !== 'number' || typeof rate !== 'number' ) { throw new Error ( 'New purchase item for clicker bar invalid' ) } const clickerButton = document . createElement ( 'button' ) clickerButton . appendChild ( document . createTextNode ( name + '. ' + 'Cost: ' + cost + ' clicks. ' + rate + ' click/s' ) ) clickerButton . className = 'clickerbutton' clickerButton . onclick = ( ) => { this . buy ( cost , rate ) } this . HTMLreference . appendChild ( clickerButton ) return { HTMLreference : clickerButton , rate : rate , cost : cost } }
Creates a new item that can be purchased with clicks
 @param {string} name - Name of the item
 @param {number} cost - Cost of the item in clicks
 @param {number} rate - Rate of click production of the item in clicks/second
 @returns An object containing the button's HTML reference, the rate, and cost of the item.
Creates a new item that can be purchased with clicks @param { string } name - Name of the item @param { number } cost - Cost of the item in clicks @param { number } rate - Rate of click production of the item in clicks / second @returns An object containing the button ' s HTML reference the rate and cost of the item .