In JavaScript is the former or the latter more efficient? Or is there even a difference?
// Method one
var path = first_part + '/' + second_part + '/' + third_part;
// Method two
var path = [first_part, second_part, third_part].join('/');
Beyond the savings of a whopping two characters there's no visual reason to prefer one over the other. But I'm curious to know if in most JavaScript interpreters one is faster or more efficient than the other and if so, is it significantly so?