1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mice21 [21]
3 years ago
11

Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Everyti

me someone clicks the "addItemButton", she would like the variable to increase by 1. What code should Jasmine insert where it says in order for her app to work?a. cart total = 1.b. cart total + 1.c. cart total = cartTotal +1.d. var cart total = cartTotal + 1.e. var cart total + 1.
Computers and Technology
1 answer:
Gemiola [76]3 years ago
6 0

Answer:

b. cart total + 1

Explanation:

A. cart total=1 do increment the total with every 1 click here, it only 're-assigns cart total with value 1 for every click, hence it's always 1.

B. In every click, 1 is always added to the previous value of cart total, like addItemButton(cart total+1) or so.

C. This would have worked too if "cart total" and "cartTotal" where of same type.

D. cart total is just being initially defined here.

E. Likewise here, var shows that cart total has just only been declared.

You might be interested in
What does the acronym vsepr represent {spelling is important} question 1 options:?
azamat
VPESR is an acronym (a word composed of the first letters of a phrase)  that stands for Valence Shell Electron Pair Repulsion.

It's a scientific theory in the field of chemisty, and it predicts the shape of a molecule based on what atoms form this molecule.

If you want to understand the meaning of the name, you can devide it into

Valence shell electron
-electrons that are on the "outside" of the atom and can form bonds with other atoms

and it's the repulsion of these electrons that is being predicted.



5 0
4 years ago
According to the video, what are some hazards Stationary Engineers may face? Check all that apply. noise, hazardous materials, d
NISA [10]

Answer:

noise, hazardous material, burns, electric shocks, moving parts.

Explanation:

i got it right on edge

6 0
3 years ago
Read 2 more answers
The object-oriented techniques to manage errors such as dividing a value by 0 comprise the group of methods known as
charle [14.2K]
The object - oriented techniques to manage errors such as dividing a value by 0 comprise the group of methods known as Error handling. Error handling is managing the mistakes made on any type of scenario. This skill is needed to all IT and Computer Science majors.
6 0
4 years ago
The qwerty keyboard is the most common layout of keys on a keyboard.
vagabundo [1.1K]
The qwerty keyboard is the most common keyboard.
6 0
4 years ago
Read 2 more answers
State<br> any three (3) reasons why users attach speakers to their computer?
lidiya [134]

Answer:

To complete the computer setup, to hear audio, to share audio.

Explanation:

A computer is not <u>really</u> complete without speakers.

So that you can actually hear the computer's audio.

So that you can have multiple people hear the same audio. (Headphones do not do this)

4 0
3 years ago
Other questions:
  • Why does the hp computer not have Bluetooth?
    6·1 answer
  • Tim is in charge of the upcoming interschool baketball tournamnent. He wants to arrange all of the teams and their members in al
    15·1 answer
  • When it comes to safety, the choice to be safe is often up to __________?
    8·1 answer
  • Which device uses radio waves? ceiling fan microwave oven air conditioner x-ray machine?
    7·1 answer
  • A great way to obtain Hands-On training in a real quick environment is to complete a ??
    12·1 answer
  • A bot can use a _______to capture keystrokes on the infected machine to retrieve sensitive information.
    10·1 answer
  • POINT AND BRAINLIEIST GIVE AWAY!!!
    11·2 answers
  • How many total bits are required for a direct-mapped cache with 128 blocks and a block size of 8 bytes, assuming a 4GB main memo
    15·1 answer
  • Why does elephant has thicker legs? Explain in terms of breaking stress?​
    15·1 answer
  • Who played Anne in the green gables??
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!