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
Daniel [21]
3 years ago
6

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

ime 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) cartTotal + 1;
c) cartTotal = cartTotal +1;
d) var cartTotal = cartTotal + 1;
Computers and Technology
1 answer:
Bas_tet [7]3 years ago
8 0

Answer:

C.     carTotal=carTotal + 1;

Explanation:

Option 'c' is the correct answer, because when some click on the "additembutton" the variable cartTotal should increment by 1. As jasmine want to track the record of no. of items in cart, each time customer will click "additembutton" the variable "cartTotal" increment by 1 and also update the value of that variable. e.g

If initially

cartTotal=0

When 1st time additembutton pressed

CartTotal = CartTotal + 1   ==> will make it as   CartTotal=0+1    ==>  CartTotal = 1

Now CartTotal=1;

When customer 2nd time press "additembutton"

CartTotal = CartTotal + 1   ==> will make it as   CartTotal=1+1    ==> CartTotal = 2

This process will continue and update the cartTotal till the customer add items into the cart.

You might be interested in
Which of the following describe design themes in PowerPoint? Choose all that apply.
astraxan [27]

Answer:

A. color scheme.

B. colors, fonts, and formatting that coordinate.

C. set of elements that unify your slides and complement your topic.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

To format an image on PowerPoint, you can either use the Artistic Effects or Picture Effects.

The Picture Effects gallery allows a user to access a variety of preconfigured formatting styles for images that are added to a PowerPoint presentation.

Basically, the Picture Effects consist of the following preconfigured formatting styles; transparent shadow, soft edge, reflection, glow, 3-D rotation, metal frame, bevels, perspectives etc.

The design themes in PowerPoint are described by the following;

A. Color scheme.

B. Colors, fonts, and formatting that coordinate.

C. Set of elements that unify your slides and complement your topic.

6 0
3 years ago
After reviewing the various types of network connections available, a client chooses a network connection that is considered to
andriy [413]

Answer:

Wired Network Connection

Explanation:

The two major types of connection is <em>Wired</em> and <em>Wireless </em>connection. The wired connection helps to transfer data between two devices using <em>Ethernet network cable</em>. The wireless connection on the other hand transfer data between endpoints using <em>microwave signals or radio frequency</em>.

<em>Wired connection</em> is preferred over <em>Wireless</em> because of interference which could be caused by other networks as well as wall obstructing the connection.

7 0
4 years ago
The rules that establish an orderly transfer of data between sender and receiver are called ____.
zloy xaker [14]
Protocols               is the answer                        
8 0
3 years ago
Read 2 more answers
After reading passage “the incredible machine” why do you think the article has been titled so?
Vitek1552 [10]
I haven’t read it, but just by the title it was probably talking about an incredible machine that was new to people.
7 0
3 years ago
Use the drop-down menus to complete statements about back-up data files.
vlada-n [284]

Answer:

the third one trust me

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Nascar has inserted an image into his document but needs the image to appear on its own line Which option should he choose?
    12·2 answers
  • In apersuasive message, opposing ideas should be:
    13·1 answer
  • Surprisingly, many of us may be unknowing victims of botnets. Because of the rising sophistication of botnet schemes, your compu
    14·1 answer
  • Which three factors should be discussed before planning and building a project?
    15·1 answer
  • Can someone help me?
    7·2 answers
  • JAVA
    10·1 answer
  • You are having difficulty changing permissions for a folder on an NTFS volume that was created by another user. How can you best
    6·1 answer
  • 3. Coaxial/telephone cable sends<br> during the data transmission<br> signal
    9·1 answer
  • Make a list of any four computer that were used in the history of computer.​
    6·1 answer
  • In binary, if there is a 1 in the 1s place the number is always
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!