quote

Table of contents

  1. 1. Syntax
  2. 2. Examples
Table of contents
  1. 1. Syntax
  2. 2. Examples

Non-standard

Returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").

Method of String
Implemented in JavaScript ?
ECMAScript Edition None

Syntax

str.quote()

Examples

str str.quote() eval(str.quote())
Hello world! "Hello world!" Hello world!
Hello
        world!
"Hello\n\tworld!" Hello
        world!
" \ — ' \" \\ \u2014 ' " \ — '

Tags (0)

Edit tags
  • No tags

Attachments (0)

 

Attach file