I have the following code which concatenates to the end of the string "errors":
this.errors += `[${new Date().toLocaleString()}] `;
this.errors += response.data.message;
this.errors += "\n-----------------\n\n";
Which generates the following string:
[30/12/2020 14:48:00] Error 1
-----------------
[30/12/2020 14:49:10] Error 2
-----------------
However I need to concatenate at the start of the string so the most recent error is always at the top:
[30/12/2020 14:49:10] Error 2
-----------------
[30/12/2020 14:48:00] Error 1
-----------------
How can I achieve this?