Is there a way to call my function based on the amount of time the user inputed

I am writing a program for a quote generator and I need some help getting my quote to generator a set number of times depending on what the user input.

I’ve tried to iterate and pus the result into an array but it only pushes the same result for e.g 4 times

//Flowers quotes
‘use strict’;

const randomFlowersQuote = () => {

const fragBeginning = ['These are very beautiful ', 'I like looking at ', ' Today We saw some new ', 'There a nice '];
const fragMiddle = ['flower pots', 'hibiscuss trees', 'red roses', 'lily flowers', 'rare flowers'];

const fragEnd = [' i would love to buy one', ' they are very nice', ' they are so breathtaking', ' in the shop'];

//Random generated quotes

const fragBeginningRandom = [Math.floor(Math.random() * fragBeginning.length)];
const fragMiddelRandom = [Math.floor(Math.random() * fragMiddle.length)];
const fragEndRandom = [Math.floor(Math.random() * fragBeginning.length)];
const fullQuote = [fragBeginning[fragBeginningRandom] + fragMiddle[fragMiddelRandom] + fragEnd[fragEndRandom]];

return fullQuote;

}

console.log(randomFlowersQuote());

I expect when the user enters 3 it calls the function 3 times.

Is there a way to call my function based on the amount of time the user inputed