fatie até o personagem javascript

var string = "55+5"; // Just a variable for your input.

function getBeforePlus(str){

    return str.split("+")[0]; 
    /* This splits the string into an array using the "+" 
       character as a delimiter.
       Then it gets the first element of the split string.
    */

}
Grieving Gharial