forked from omiras/functions-playground-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex6.html
30 lines (23 loc) · 992 Bytes
/
index6.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Ejercicio 6</h1>
<script>
/**
* Las etiquetas <script> son otra forma de ejecutar código JavaScript. Sin embargo, como ya veremos más adelante, no disponemos de exactamente los mismos mecanismos en el navegador Web, que mediante el interpréte 'node'
*/
/**
* La functión predefinida "alert" toma como parámetro un valor (string/number) y lo muestra en una venta emergente
*/
// Fíjate que el código se ejecuta CADA VEZ que se carga el documento HTML
// Ejercicio: Modifica la invocación de la función "alert" para que muestre un mensaje "mensaje". Funciona? Si no funciona, es posible que tengas que hacer algo más que simplemente pasar el valor de la variable.
let mensaje = "mensaje"
alert(mensaje)
</script>
</body>
</html>