Concatenating Multiple String and Texts Together Into A String - Blogger Javascript

I have 2 questions here :

Question 1.

How to concatenate multiple text and strings into one String variable and return the string?

    function TagGen()
    {
    var getTitle="Nidome no Jinsei wo Isekai de Chapter 1 Raw Manga";
    var getTag=getTitle.substring(0, getTitle.lastIndexOf(" Chapter"));
    var setTags={""+getTitle+", "+getTitle+" Raw Manga"+", "+getTitle+", "+getTag+" Raw Manga"+", "+getTag+" Raw"+", "+getTag+" Manga Download"+", "+getTag+" Download"+", "+getTag+" jcafe"+", "+getTag+" Chapter Download,"+", "+getTag+" Raw Chapters"+", "+getTag+" jcafe24"+", "+"Raw Download"+", "+getTitle+" Raw Manga Download"+", "+getTitle+" jcafe"};
    return setTags;
    }

I want the setTags to be have the string value something like the below,

setTags=Nidome no Jinsei wo Isekai de Chapter 1 Raw Manga, Nidome no Jinsei wo Isekai de, Nidome no Jinsei wo Isekai de Chapter 1, Nidome no Jinsei wo Isekai de Raw, Nidome no Jinsei wo Isekai de Chapters, Nidome no Jinsei wo Isekai de Raw Chapters, Nidome no Jinsei wo Isekai de Download, Nidome no Jinsei wo Isekai de Raw Download, Nidome no Jinsei wo Isekai de Chapter Download

I tried to run this code several times in Tryit Editor but didn't get setTags variable working. Please help.

Question 2.

I want to store multiple tags of my blogger blog post into one String. I know that there must be some b:loop used but I still have not yet fully understood its uses.

Suppose I have a post with the labels : Action,Adventure,Romance,Shounen

I want it to get all those labels and store it in a String like:

labels=Action,Adventure,Romance,Shounen

The basic idea of the saving into String is same as the first question but I don't know how to get multiple tags and do it.

Please help :D

javascript,html,blogger,

0