--- title: Komentarz slug: Web/JavaScript/Reference/Lexical_grammar tags: - Dokumentacja_JavaScript - Dokumentacje - JavaScript - Wszystkie_kategorie translation_of: Web/JavaScript/Reference/Lexical_grammar#Comments translation_of_original: Web/JavaScript/Reference/Code_comments original_slug: Web/JavaScript/Referencje/Komentarz ---
Uwagi od programisty wyjaśniające działanie kodu. Komentarze są ignorowane przez interpreter.
Komentarze | |
Zaimplementowane w: | JavaScript 1.0, NES2.0 |
Wersja ECMA: | ECMA-262 |
// tekst komentarza
/* wieloliniowy tekst komentarza */
JavaScript obsługuje komentarze w stylu Javy:
//
),/*
, a zakończone znakami */
. Komentarze wieloliniowe
nie mogą
być zagnieżdżane.// To jest komentarz jednoliniowy. var intAge = 37; //To jest inny komentarz
/* To jest komentarz wieloliniowy. Może być dowolnie długi i zawierać dowolne znaki, za wyjątkiem innych komentarzy wieloliniowych. */
{{ languages( { "en": "en/Core_JavaScript_1.5_Reference/Comments/comment", "es": "es/Referencia_de_JavaScript_1.5/Comentarios/comentario", "fr": "fr/R\u00e9f\u00e9rence_de_JavaScript_1.5_Core/Commentaires", "ja": "ja/Core_JavaScript_1.5_Reference/Comments/comment" } ) }}