1

Just asking to clarify. If I have a string literal inside of a function, is it "recreated" every time I call the function? Let's say I have this:

function myFunc(){
    var a = otherFunc("string1"),
        b = someFunc("this is quite a long string isn't it? yes, yes it is");

    // Some other code
}

Do those strings get recreated on every call, or just when I declared the function?

0 Answers0