From b5461b9128a5dc89b3ceac6795f0c75c71f837a1 Mon Sep 17 00:00:00 2001 From: mayravargasbecerra13 Date: Thu, 28 Jul 2022 16:48:36 -0500 Subject: [PATCH 1/2] Agrego primer ejercicio de javarcript --- 1-syntax-basic-constructs/basic-js.html | 15 +++++++++++++++ 1-syntax-basic-constructs/basic.js | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 1-syntax-basic-constructs/basic-js.html create mode 100644 1-syntax-basic-constructs/basic.js diff --git a/1-syntax-basic-constructs/basic-js.html b/1-syntax-basic-constructs/basic-js.html new file mode 100644 index 0000000..a6518b5 --- /dev/null +++ b/1-syntax-basic-constructs/basic-js.html @@ -0,0 +1,15 @@ + + + + + + + Document + + + + + + + + \ No newline at end of file diff --git a/1-syntax-basic-constructs/basic.js b/1-syntax-basic-constructs/basic.js new file mode 100644 index 0000000..8054ffe --- /dev/null +++ b/1-syntax-basic-constructs/basic.js @@ -0,0 +1,9 @@ +const edad = prompt ('Ingrese su edad:') +function mayorEdad(edad) { + if (edad > 18 ){ + alert('mayor edad') +}else { + alert('Es menor de edad') +} +} +mayorEdad(edad) From 7a2030f16c074304c0930daa63ccc4722118806f Mon Sep 17 00:00:00 2001 From: mayravargasbecerra13 Date: Tue, 9 Aug 2022 11:16:18 -0500 Subject: [PATCH 2/2] Ajustes de sintanxis --- 1-syntax-basic-constructs/basic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-syntax-basic-constructs/basic.js b/1-syntax-basic-constructs/basic.js index 8054ffe..62697bf 100644 --- a/1-syntax-basic-constructs/basic.js +++ b/1-syntax-basic-constructs/basic.js @@ -1,8 +1,8 @@ const edad = prompt ('Ingrese su edad:') -function mayorEdad(edad) { +function mayorEdad(edad){ if (edad > 18 ){ alert('mayor edad') -}else { +} else { alert('Es menor de edad') } }