js

Formats a string for use in a "..." JavaScript literal string declaration.

This function performs string manipulation such as changing double quotes to single quotes.

Type and Usage

Parameters

The only parameter is the string.

Output

Returns a string formatted for use in a JavaScript string declaration.

Example

Formats the string variablestring for use in a JavaScript string declaration:

<$js("variablestring")$>