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
Explain the strengths and weaknesses you have experienced with content information
denis23 [38]
On which story its not here?
4 0
3 years ago
Jason works as an accountant in a department store. He needs to keep a daily record of all the invoices issued by the store. Whi
kotykmax [81]

Are there any options

3 0
3 years ago
Read 2 more answers
Which item can be added to Outlook messages, like a Word document or PowerPoint presentation, that takes standard bulleted lists
Sonja [21]

Answer:

WordArt

Explanation:

Took exam

4 0
2 years ago
All of the following are ways to save money on transportation except :
Lisa [10]
The options listed are not related to the question. and if they were related in any sense then I would say the cheapest thing on the list is a phone card so I guess you can buy that and save the most for your travel as you can use phone cards anywhere as they have 1800 numbers which are free from any public phone. 
7 0
3 years ago
Xml provides a standardized, non-customizable way to describe the content of a document.
Rainbow [258]
XML (eXtensible Markup Language) is a meta-language that defines a language (of your creation, within XML specs). The language that you create has to follow your specifications.
7 0
3 years ago
Other questions:
  • A/An ___ is a series of instructions or commands that computer follows used to create software
    10·2 answers
  • You would like to know how many cells contain data. Which function should you use?
    11·1 answer
  • Select the correct answer.
    15·1 answer
  • 50 POINTS & A FOLLOW!
    11·2 answers
  • The order of precedence is very important when building formulas in Excel. Which of the following formulas will produce 778 as t
    11·1 answer
  • Which of the following are benefits of designing a scalable system? Choose 3 options.
    15·1 answer
  • IT specialists must display technical expertise and collaborative proficiency in the workplace. Select the IT specialist who dem
    7·1 answer
  • The data type of 17.3 should be ________________.
    12·2 answers
  • Select the correct answer.
    9·1 answer
  • Why are iterators useful?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!