Texte en double javascript

const duplicate = (string) => {
  const count = Number(
    prompt("How many times do you want to duplicate the text?")
  );
  return string.repeat(count + 1);
};

console.log(duplicate("Hello, World!"))
mrmalik610