--- title: String.prototype.toSource() slug: Web/JavaScript/Reference/Global_Objects/String/toSource tags: - JavaScript - Method - Non-standard - Prototype - String translation_of: Web/JavaScript/Reference/Global_Objects/String/toSource original_slug: Web/JavaScript/Referencje/Obiekty/String/toSource ---

{{JSRef}}{{non-standard_header}}

Podsumowanie

Zwraca łańcuch znaków reprezentujący kod źródłowy obiektu.

Składnia

String.toSource()
str.toSource()

Opis

Metoda toSource() zwraca następujące wartości:

Ta metoda jest w JavaScript wywoływana zazwyczaj wewnętrznie, nie bezpośrednio w kodzie.