aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/console/log/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/api/console/log/index.html')
-rw-r--r--files/pt-br/web/api/console/log/index.html119
1 files changed, 119 insertions, 0 deletions
diff --git a/files/pt-br/web/api/console/log/index.html b/files/pt-br/web/api/console/log/index.html
new file mode 100644
index 0000000000..b25a14a3fe
--- /dev/null
+++ b/files/pt-br/web/api/console/log/index.html
@@ -0,0 +1,119 @@
+---
+title: Console.log()
+slug: Web/API/Console/log
+translation_of: Web/API/Console/log
+---
+<div>{{APIRef("Console API")}}{{Non-standard_header}}</div>
+
+<h2 id="Summary" name="Summary">Sumário</h2>
+
+<p>Exibe uma mensagem na console do navegador.</p>
+
+<h2 id="Syntax" name="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">console.log(<em>obj1</em>[, <em>obj2</em>, ..., <em>objN]</em>);
+console.log(<em>msg</em>[, <em>subst1</em>, ..., <em>substN]</em>);
+</pre>
+
+<h2 id="Parameters">Parameters</h2>
+
+<dl>
+ <dt><code>obj1</code> ... <code>objN</code></dt>
+ <dd>Uma lista de objetos JavaScript para exibir. A representação por escrito de cada um desses objetos é exibida na ordem com a qual foram inseridos na função.</dd>
+ <dt><code>msg</code></dt>
+ <dd>Uma string JavaScript com zero ou mais substituições.</dd>
+ <dt><code>subst1</code> ... <code>substN</code></dt>
+ <dd>Strings ou objetos JavaScript para substituirem as marcações de substituição em <code>msg</code>. Estas substituições ocorrem de um para um e na ordem em que são passadas para a console.log.</dd>
+</dl>
+
+<p>Veja <a href="/en-US/docs/DOM/console#Outputting_text_to_the_console" title="DOM/console#Outputting_text_to_the_console">Exibindo texto na console</a> na documentação do objeto {{domxref("console")}} para mais detalhes.</p>
+
+<h2 id="Specification" name="Specification">Especificação</h2>
+
+<p>Não faz parte de nenhuma especificação.</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suporte básico</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("2.0")}}</td>
+ <td>8</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Strings de substituição</td>
+ <td>
+ <p>{{CompatVersionUnknown}}</p>
+
+ <p>{{CompatChrome(28)}}</p>
+
+ <p>%d - se um valor fracional negativo é passado, ele será arredondado para baixo, exemplo: -0,35 será arredondado para 1</p>
+ </td>
+ <td>{{CompatGeckoDesktop("9.0")}}</td>
+ <td>
+ <p>10 - parcial</p>
+
+ <p>%c - não suportado<br>
+ <span style="line-height: 1.572;">%d - irá renderizar como 0 quando NaN</span></p>
+ </td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suporte básico</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoMobile("2.0")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Strings de substituição</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoMobile("9.0")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Ver_também">Ver também</h2>
+
+<ul>
+ <li><a class="external" href="http://www.opera.com/dragonfly/documentation/console/">Opera Dragonfly documentation: Console</a></li>
+ <li><a class="external" href="http://msdn.microsoft.com/library/gg589530">MSDN: Using the F12 Tools Console to View Errors and Status</a></li>
+ <li><a href="http://getfirebug.com/wiki/index.php/Console_API" title="http://getfirebug.com/wiki/index.php/Console_API">Firebug wiki: Console API</a> - Firebug supports additional features in its console.log() implementation, such as <a href="http://www.softwareishard.com/blog/firebug/firebug-tip-styled-logging/" title="http://www.softwareishard.com/blog/firebug/firebug-tip-styled-logging/">styled logging</a>.</li>
+ <li><a href="http://nodejs.org/docs/latest/api/console.html#console_console_log_data">NodeJS: Console API</a></li>
+</ul>