add complete js solution for triangle words, problem 42