# JSStringFormat()

Escapes special JavaScript characters, such as single quotation
mark, double quotation mark, and newline

```
JSStringFormat( string=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| string | string | Yes | A string or a variable that contains one. |  |

# Examples

```cfml
str = "Bob's comment was ""CFML rocks!""";
writeOutput(str & "<br>");
writeOutput(JSStringFormat(str));
```







# Categories

[JavaScript](../../categories/javascript.md), [Strings](../../categories/string.md), [Formatting](../../categories/formatting.md)

# See Also

[WriteOutput()](writeoutput.md)