SlideShare una empresa de Scribd logo
1 de 5
Módulo 5:
Tema:
Condicionales simples y compuestas en JavaScript.
Indicador de logro:
• 5.5. Identifica un condicional simple y compuesta en JavaScript.
5.6. Aplica el uso de condicionales simples y compuestas en JavaScript.
Reflexión
Reto visual: encuentra la palabra ELEGANTE
Tipos de condicionales.
Las estructuras de selección o condicionales son estructuras lógicas que
permiten controlar la ejecución de aquellas acciones que requieren de
ciertas condiciones para su realización.
Las condiciones se pueden clasificar esencialmente 3 tipos:
• Simples
• Dobles
• Anidadas o Múltiples
Condición simple: se utiliza cuando una o varias acciones se encuentran
condicionadas para que se lleven a cabo, pero no se tiene una opción
alterna.
Condicional doble: permite establecer acciones cuando una condición se
cumple, como cuando no se cumple, de esta manera se dice que hay
acciones o instrucciones que se ejecutan en cada uno de los escenarios.
Múltiples: las estructuras de selección múltiples o
anidadas están compuesta múltiples selecciones
simples que están unidas por el comando elsif el
resultado que se obtiene con una selectiva múltiple
se puede obtener con varias selecciones simples.
Estructuras Anidadas: puede anidar una
estructura dentro de otra estructura, y por tanto
guardar los elementos asociados.
Condicionales
Comentarios en JavaScript
Comentario de varias líneas:
/*
linea de comentario 1.
linea de comentario 2.
etc.
*/
Comentario de una línea:
//Convertimos los 3 string en enteros

Más contenido relacionado

Último

01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.pptoscarvielma45
 
Reporte de Exportaciones de Fibra de alpaca
Reporte de Exportaciones de Fibra de alpacaReporte de Exportaciones de Fibra de alpaca
Reporte de Exportaciones de Fibra de alpacajeremiasnifla
 
Condensadores de la rama de electricidad y magnetismo
Condensadores de la rama de electricidad y magnetismoCondensadores de la rama de electricidad y magnetismo
Condensadores de la rama de electricidad y magnetismosaultorressep
 
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVEl proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVSebastianPaez47
 
Principales aportes de la carrera de William Edwards Deming
Principales aportes de la carrera de William Edwards DemingPrincipales aportes de la carrera de William Edwards Deming
Principales aportes de la carrera de William Edwards DemingKevinCabrera96
 
Obras paralizadas en el sector construcción
Obras paralizadas en el sector construcciónObras paralizadas en el sector construcción
Obras paralizadas en el sector construcciónXimenaFallaLecca1
 
ECONOMIA APLICADA SEMANA 555555555555555555.pdf
ECONOMIA APLICADA SEMANA 555555555555555555.pdfECONOMIA APLICADA SEMANA 555555555555555555.pdf
ECONOMIA APLICADA SEMANA 555555555555555555.pdffredyflores58
 
PPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfPPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfalexquispenieto2
 
Flujo multifásico en tuberias de ex.pptx
Flujo multifásico en tuberias de ex.pptxFlujo multifásico en tuberias de ex.pptx
Flujo multifásico en tuberias de ex.pptxEduardoSnchezHernnde5
 
Elaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfElaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfKEVINYOICIAQUINOSORI
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaXimenaFallaLecca1
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfedsonzav8
 
presentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricopresentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricoalexcala5
 
Una estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTUna estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTFundación YOD YOD
 
Presentación electricidad y magnetismo.pptx
Presentación electricidad y magnetismo.pptxPresentación electricidad y magnetismo.pptx
Presentación electricidad y magnetismo.pptxYajairaMartinez30
 
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptx
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptxPPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptx
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptxSergioGJimenezMorean
 
Magnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMagnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMarceloQuisbert6
 
desarrollodeproyectoss inge. industrial
desarrollodeproyectoss  inge. industrialdesarrollodeproyectoss  inge. industrial
desarrollodeproyectoss inge. industrialGibranDiaz7
 
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERAS
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERASDOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERAS
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERASPersonalJesusGranPod
 

Último (20)

01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
 
Reporte de Exportaciones de Fibra de alpaca
Reporte de Exportaciones de Fibra de alpacaReporte de Exportaciones de Fibra de alpaca
Reporte de Exportaciones de Fibra de alpaca
 
Condensadores de la rama de electricidad y magnetismo
Condensadores de la rama de electricidad y magnetismoCondensadores de la rama de electricidad y magnetismo
Condensadores de la rama de electricidad y magnetismo
 
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVEl proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
 
Principales aportes de la carrera de William Edwards Deming
Principales aportes de la carrera de William Edwards DemingPrincipales aportes de la carrera de William Edwards Deming
Principales aportes de la carrera de William Edwards Deming
 
Obras paralizadas en el sector construcción
Obras paralizadas en el sector construcciónObras paralizadas en el sector construcción
Obras paralizadas en el sector construcción
 
ECONOMIA APLICADA SEMANA 555555555555555555.pdf
ECONOMIA APLICADA SEMANA 555555555555555555.pdfECONOMIA APLICADA SEMANA 555555555555555555.pdf
ECONOMIA APLICADA SEMANA 555555555555555555.pdf
 
PPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfPPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdf
 
Flujo multifásico en tuberias de ex.pptx
Flujo multifásico en tuberias de ex.pptxFlujo multifásico en tuberias de ex.pptx
Flujo multifásico en tuberias de ex.pptx
 
Elaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfElaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdf
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdf
 
presentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricopresentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctrico
 
Una estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTUna estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NIST
 
Presentación electricidad y magnetismo.pptx
Presentación electricidad y magnetismo.pptxPresentación electricidad y magnetismo.pptx
Presentación electricidad y magnetismo.pptx
 
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdfVALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
VALORIZACION Y LIQUIDACION MIGUEL SALINAS.pdf
 
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptx
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptxPPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptx
PPT SERVIDOR ESCUELA PERU EDUCA LINUX v7.pptx
 
Magnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMagnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principios
 
desarrollodeproyectoss inge. industrial
desarrollodeproyectoss  inge. industrialdesarrollodeproyectoss  inge. industrial
desarrollodeproyectoss inge. industrial
 
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERAS
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERASDOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERAS
DOCUMENTO PLAN DE RESPUESTA A EMERGENCIAS MINERAS
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Clase #42. Semana 26. Condicionales simples y compuestas en JavaScript.pptx

  • 1. Módulo 5: Tema: Condicionales simples y compuestas en JavaScript. Indicador de logro: • 5.5. Identifica un condicional simple y compuesta en JavaScript. 5.6. Aplica el uso de condicionales simples y compuestas en JavaScript.
  • 2. Reflexión Reto visual: encuentra la palabra ELEGANTE
  • 3. Tipos de condicionales. Las estructuras de selección o condicionales son estructuras lógicas que permiten controlar la ejecución de aquellas acciones que requieren de ciertas condiciones para su realización. Las condiciones se pueden clasificar esencialmente 3 tipos: • Simples • Dobles • Anidadas o Múltiples Condición simple: se utiliza cuando una o varias acciones se encuentran condicionadas para que se lleven a cabo, pero no se tiene una opción alterna. Condicional doble: permite establecer acciones cuando una condición se cumple, como cuando no se cumple, de esta manera se dice que hay acciones o instrucciones que se ejecutan en cada uno de los escenarios.
  • 4. Múltiples: las estructuras de selección múltiples o anidadas están compuesta múltiples selecciones simples que están unidas por el comando elsif el resultado que se obtiene con una selectiva múltiple se puede obtener con varias selecciones simples. Estructuras Anidadas: puede anidar una estructura dentro de otra estructura, y por tanto guardar los elementos asociados. Condicionales
  • 5. Comentarios en JavaScript Comentario de varias líneas: /* linea de comentario 1. linea de comentario 2. etc. */ Comentario de una línea: //Convertimos los 3 string en enteros