-
Notifications
You must be signed in to change notification settings - Fork 0
/
comentario-js.html
235 lines (207 loc) · 9.19 KB
/
comentario-js.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE html>
<html lang="pt-BR" class="h-100">
<head>
<meta charset="utf-8">
<title>Comentário JS</title>
<meta name="description" content="Comentário JS">
<meta name="keywords" content="Comentário JS">
<meta name="author" content="Marcus">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="robots" content="index, follow">
<link href="css/bootstrap.css" rel="stylesheet">
<link rel="shortcut icon" href="img/mlsicon.ico">
<link href="css/sticky-footer-navbar.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
table {
width: 100%;
margin-bottom: 20px;
}
thead {
text-align: center;
background-color: #000;
color: #fff;
}
tr:nth-child(even) {
background-color: #eee;
}
table, td {
border: .5px solid rgba(0,0,0,0.5);
}
th, td {
font-size: 1.2em;
padding: 8px;
text-align: center;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
</head>
<body class="d-flex flex-column h-100">
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="https://mlssystem.github.io"><img id="icone" src="img/menu.png"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li>
<a class="nav-link" href="https://mlssystem.github.io/">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ Conteúdo</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="w3schools.html">W3Schools</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Comentário JS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://bibliasagrada.github.io" target="_blank" >Bíblia</a>
</li>
</ul>
<!--<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-secondary my-2 my-sm-0" type="submit">Pesquisar</button>
</form>-->
</div>
</nav>
<main role="main" class="flex-shrink-0">
<div class="container">
<p id="iniciando"></p>
<h1>Comentários em JS</h1>
<h2>Comentários de JavaScript</h2>
<p>Comentários de JavaScript podem ser usados para explicar o código JavaScript e torná-lo mais legível.</p>
<p>Os comentários de JavaScript também podem ser usados para evitar a execução, ao testar o código alternativo.</p>
<h2>Comentários de linha única</h2>
<p>Os comentários de uma única linha começam com //.</p>
<p>Qualquer texto entre //e o final da linha será ignorado pelo JavaScript (não será executado).</p>
<p>Este exemplo usa um comentário de uma única linha antes de cada linha de código:</p>
<p><strong>Exemplo:</strong></p>
<div class="exemplo">
<pre><code>
// Change heading:
document.getElementById("myH").innerHTML = "My First Page";
// Change paragraph:
document.getElementById("myP").innerHTML = "My first paragraph.";
</code></pre>
</div>
<p>Este exemplo usa um comentário de uma única linha no final de cada linha para explicar o código:</p>
<p><strong>Exemplo:</strong></p>
<div class="exemplo">
<pre><code>
let x = 5; // Declare x, give it the value of 5
let y = x + 2; // Declare y, give it the value of x + 2
</code></pre>
</div>
<h2>Comentários multilinhas</h2>
<p>Comentários multilinhas começam com /*e terminam com */.</p>
<p>Qualquer texto entre /*e */será ignorado pelo JavaScript.</p>
<p>Este exemplo usa um comentário de várias linhas (um bloco de comentário) para explicar o código:</p>
<p><strong>Exemplo:</strong></p>
<div class="exemplo">
<pre><code>
/*
The code below will change
the heading with id = "myH"
and the paragraph with id = "myP"
in my web page:
*/
document.getElementById("myH").innerHTML = "My First Page";
document.getElementById("myP").innerHTML = "My first paragraph.";
</code></pre>
</div>
<div class="observacao">
<p>É mais comum usar comentários de uma única linha.</p>
<p>Os comentários do bloco são freqüentemente usados para documentação formal.</p>
</div>
<h2>Usando comentários para prevenir a execução</h2>
<p>Usar comentários para evitar a execução de código é adequado para teste de código.
<p>Adicionar //na frente de uma linha de código altera as linhas de código de uma linha executável para um comentário.</p>
<p>Este exemplo usa // para evitar a execução de uma das linhas de código:</p>
<p><strong>Exemplo:</strong></p>
<div class="exemplo">
<pre><code>
//document.getElementById("myH").innerHTML = "My First Page";
document.getElementById("myP").innerHTML = "My first paragraph.";
</code></pre>
</div>
<p>Este exemplo usa um bloco de comentário para evitar a execução de várias linhas:</p>
<p><strong>Exemplo:</strong></p>
<div class="exemplo">
<pre><code>
/*
document.getElementById("myH").innerHTML = "My First Page";
document.getElementById("myP").innerHTML = "My first paragraph.";
*/
</code></pre>
</div>
<p></p>
<p>Fonte: <a style="color:blue;" href="https://www.w3schools.com/js/js_comments.asp" target="_blank">w3schools</a></p>
</div>
</main>
<hr style="border: 1px solid black;">
<!-- <footer class="container py-5"> -->
<footer class="py-5">
<div class="row">
<div class="col-12 col-md">
<img src="img/30.png" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mb-2" role="img" viewBox="0 0 24 24" focusable="false"><title>Product</title><circle cx="12" cy="12" r="10"/>
<small class="d-block mb-3 text-muted">Copyright ©2020 - Marcus LS</small>
</div>
<div class="col-6 col-md">
<h5> Programação </h5>
<ul class = "list-unstyled text-small">
<li> <a class="text-muted" href="https://mlssystem.github.io/estudos.html">Estudos</a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/algoritmo">Algoritmo</a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/html">HTML</a> </li>
<li> <a class="text-muted" href="#"> CSS </a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/javascript"> JAVASCRIPT </a> </li>
<li> <a class="text-muted" href="#"> PHP </a> </li>
<li> <a class="text-muted" href="#"> JAVA </a> </li>
</ul>
</div>
<div class = "col-6 col-md">
<h5> BitBlockDig </h5>
<ul class = "list-unstyled text-small">
<li> <a class="text-muted" href="https://mlssystem.github.io/bitblockdig/index.html" target="_blank"> BBD </a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/bitblockdig/criptomoedas.html" target="_blank"> Criptomoedas </a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/bitblockdig/bitcoin.html" target="_blank"> Bitcoin </a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/bitblockdig/ethereum.html" target="_blank"> Ethereum </a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/bitblockdig/litecoin.html" target="_blank"> Litecoin </a> </li>
</ul>
</div>
<div class = "col-6 col-md">
<h5> Links </h5>
<ul class = "list-unstyled text-small">
<li> <a class="text-muted" href="https://bibliasagrada.github.io" target="_blank" >Bíblia</a> </li>
<li> <a class="text-muted" href="https://mlssystem.github.io/trabalhadoresdaseara" target="_blank"> Trabalhadores da Seara </a> </li>
</ul>
</div>
<div class = "col-6 col-md">
<h5> Sobre </h5>
<ul class = "list-unstyled text-small">
<li> <a class="text-muted" href="#"> Privacidade </a> </li>
<li> <a class="text-muted" href="#"> Termos </a> </li>
</ul>
</div>
</div>
<p>
<a href="#"><img style="float: right;" src="img/top.png"></a>
</p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="js/bootstrap.bundle.min.js"></script>
</body>
</html>