Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Miljan Grcic
I uploaded it on link
Hafiz Mughees siddiqui
@Nightimer then?
Kaz Baig
@Nightimer Cleanest way would be grid but could also be done with float + flex / just flex
kbaig sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @iangracia |http://www.freecodecamp.com/iangracia
Kaz Baig
@iangracia your float is messing with it so you would need a clearfix if you want to keep using float
kbaig sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
Kaz Baig
Center is not a valid value for float btw
@Nightimer you can learn about flexbox in a kind of fun way with this app
@alteducation I'd try to use either all vanilla JS or all jQuery - pick one. Replace innerText with textContent. If you want to reduce the list of vars at the top, remove filterState and filterApproach at the beginning and just use states.value and approach.value and 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"));
Ian Gracia

"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"

because you don't have the change for it
["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0],
Ian Gracia
I have 1.01 dollar, no?
you have a 1 dollar bill and a 1 cent coin
how do you give back 0.50 ?
Ian Gracia
i understand
thanks @Gersho
it is a cash register, not a bank account ;)
iangracia sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 535 | @gersho |http://www.freecodecamp.com/gersho
Ian Gracia
Yeah, my fault in logic :)
the whole challenge got ALOT harder all of a sudden :laughing:
Matej Bošnjak
Hi. @mbosnjak01
Hi. Just a quick question about ng-repeat in Amgular JS, if anyone could answer me here (angularjs room isn't much active). Is it possible to repeat items from multiple scopes? (an array of scopes with indentical properties) ... for example <div ng-repeat ="item in arrayOfScopes"></div> ? - where array of scopes would be something like this: arrayOfScopes = [$scopeOne, $scopeTwo ... ] ? Is something like this possible?
I really don't want to have separate div element for each scope
Lean Junio
@mbosnjak01 Can’t you make an object that has access to different properties?
$scope.object = {}

// later use


instead of multiple scopes?
Matej Bošnjak
@leanjunio How would I implement that in a single div element?
I mean, is it possible ...
Lean Junio
@mbosnjak01 I see what you mean now
@mbosnjak01 well, give it a try, create 2 arrays within a scope object, and then ng-repeat them both using 2 divs
Matej Bošnjak
Using 2 divs will work
But I was thinking of repeating both of them in a single div
Lean Junio
oh, i see
what does ur html look like?
and what are you trying to feed into it?
Matej Bošnjak
users ... I have 2 api calls, first call get's 10 users in a scope, and second 5 users ... but my scope doesn't work properly when I do 2 calls on one scope ... so I was thinking of dinamically creating a scope (with indentical properties) on a single div, so I don't need to create multiple divs via html or js.
creating a scope for each api call
so if I could do something like ng-repeat="scope1 |scope2" would be great XD
if not, i'll have to go and create div for each scope :(
Lean Junio
lol, doesn’t seem like that’s allowed https://docs.angularjs.org/api/ng/directive/ngRepeat
Do you have your code on Github?
can someone be able to give me some pointers on handling api with angularjs?
I don't know why it isn't working, help would be appreciated
Lean Junio
what’s the endpoint you’re trying to hit?