CS 105 Study Guide - Final Guide: Formula Atlantic, Organza, Charmeuse

108 views13 pages
CS 105 Full Course Notes
11
CS 105 Full Course Notes
Verified Note
11 documents

Document Summary

Consider a small business where you are selling strawberries. For the next three questions, consider the following findprice function that takes in the number of pounds of strawberries ordered as input and returns the price of the order. 9 var findprice = function(pounds) { var price = 3 * pounds; if ( ___line 4___ ) { Which line of code must be placed into the blank on line 8 so that the findprice function will correctly populate totalprice with the correct price: return price, return pounds, console. log(price), console. log(pounds), console. log(totalprice); Suppose you opened your own bakery and sold three types of treats: cookies, muffins, and cupcakes. As a sales tactic, you charge a different price per item based on the quantity of the item a customer buys. The first sheet, menu, contains the prices of your items based on the minimum quantity ordered (as explained above):