Your two examples are not equal, when using join you end up with an empty <li></li> whereas in the concat example you wouldn't. You'd need to concat the <li> and </li> in the for loop and do a .join('') to have the same result.