textContent. If you want to reduce the list of
vars at the top, remove
filterApproachat the beginning and just use
approach.valueand then combine aproachnode and statenode into titleState and titleApproach.
var card = document.getElementsByClassName("card-parent"); var titleState = Array.from(document.getElementsByClassName("space-state")); var titleApproach = Array.from(document.getElementsByClassName("space-approach"));
"Design a cash register drawer function checkCashRegister() that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the third argument.
cid is a 2D array listing available currency.
Return the string "Insufficient Funds" if cash-in-drawer is less than the change due. Return the string "Closed" if cash-in-drawer is equal to the change due.
Otherwise, return change in coin and bills, sorted in highest to lowest order."
checkCashRegister(19.50, 20.00, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1.00], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return "Insufficient Funds"
Shouldn't the above test return 0.5?? and not "Insufficient Funds"
you'll need to use HTTPS (and probably JSONP after that) for that API @Niloy513
angular.min.js:sourcemap:103 Mixed Content: The page at 'https://s.codepen.io/Niloy513/pen/VMQNmd?editors=1011' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en'. This request has been blocked; the content must be served over HTTPS.