Problem Description
A documentation company MoogleSoft is working on new, user-requested features. One requested feature is document alignments. Engineers are working on adding alignments “Center,” “Left,” and “Right.” But the engineers can’t figure out how to let users justify text. Your job is to implement justify text features in JavaScript for this company!
Task
Use your JavaScript knowledge to help a given textual string break down into an array of lines so that each line is justified.
Challenge: Throughout this project, you can solve anything with functional programming: either using methods or recursion. Here, implement all solutions using either recursion or methods available in JavaScript. Avoid using any loops.