Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Task - Coffee Shop Sales | Getting Started
Introduction to JavaScript
course content

Contenido del Curso

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - Coffee Shop Sales

Tarea

Swipe to start coding

You are helping a coffee shop calculate their sales.

The shop sells coffee for an average of $5 per cup, and customers sometimes pay extra, requiring change to be given.

Your task is to:

  • Include a multi-line comment at the top of your code which describes the program with the following text:
text
  • Write a console.log statement to display the total earnings after selling 7 coffees to a customer (each costs $5). The output must be in the format: Total earnings: X;
  • Write a console.log statement to display how much change a customer should receive after paying $50 for the 7 coffees. (Use the format: Customer change: X);

Example Output:

python

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 14
toggle bottom row

book
Task - Coffee Shop Sales

Tarea

Swipe to start coding

You are helping a coffee shop calculate their sales.

The shop sells coffee for an average of $5 per cup, and customers sometimes pay extra, requiring change to be given.

Your task is to:

  • Include a multi-line comment at the top of your code which describes the program with the following text:
text
  • Write a console.log statement to display the total earnings after selling 7 coffees to a customer (each costs $5). The output must be in the format: Total earnings: X;
  • Write a console.log statement to display how much change a customer should receive after paying $50 for the 7 coffees. (Use the format: Customer change: X);

Example Output:

python

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 14
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Lamentamos que algo salió mal. ¿Qué pasó?
some-alt