new to ng4/typescript and having some difficulty. How do I sum the items in an array?
Added screenshot of what it looks like in action for example
for (let card of this.cards) {
for (let val of card.cards){
if(val.value == "JACK"){
val.value = 10;
}
if (val.value == "QUEEN"){
val.value = 10;
}
if (val.value == "KING"){
val.value = 10;
}
if (val.value == "ACE"){
val.value = 10;
}
this.hand = Number(val.value) + Number(val.value); (I'm sure this is wrong)
}
}