Lodash library project _.pad()

I’m trying to implement pad method of Lodash library and i tried some different ways, but i get stuck.

Any idea of what is wrong?

1 Like

Finally i found the solution. Only it’s necessary to check the length and return str, the rest was a lot of code that remains