Skip to main content

.side_by_side()

A function that takes 2 strings and formats them to display side-by-side.

Syntax

#fs.scripts.lib().side_by_side(str1, str2);

Parameters

str1

The string that will appear on the left side.

str2

The string that will display on the right side.

Return

Returns a string.

Example

function(context, args) {
const l = #fs.scripts.lib();
const left_side = "Line 1 left\nLine 2 left";
const right_side = "Line 1 right\nLine 2 right";

return l.side_by_side(left_side, right_side);
}