JSFiddle - React, Tailwind, and code Playground

JavaScript

//Problem1 part 1
let ABCAuctionsArray = [{
  CompanyName: 'ABC',
  CompanyAddress: '10 Mount Street, Auckland 1010',
  CompanyPhoneContact: 0210323423,
  CompanyAuctions: [{
      itemOwnerUsername: 'Sally',
      itemName: 'Huwawei P20 Pro Plus phone',
      itemDescription: 'good quality phone of huwawei',
      itemStartBid: 200,
      itemBidArray: [{
        bidderUserName: 'Lee',
        biddersAmount: 200
      }, {
        bidderUserName: 'Lean',
        biddersAmount: 210
      }]
    },
    {
      itemOwnerUsername: 'Saul',
      itemName: 'UL zPacks Duplex Tent',
      itemDescription: 'good quality tent',
      itemStartBid: 260,
      itemBidArray: [{
        bidderUserName: 'Anna',
        biddersAmount: 260
      }, {
        bidderUserName: 'bella',
        biddersAmount: 270
      }, {
        bidderUserName: 'becky',
        biddersAmount: 280
      }],
    }
  ]
}];
console.log(ABCAuctionsArray);

//Problem 1 Part 2
/*let CardDecksArray=[];
let cards=['spades','hearts', 'diamonds','clubs'];
var values = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"];
for 
*/
/*INSTRUCTIONS
1. Create an array of cards with card name property and card values property
2. make a loop where the code runs through all the card values 
3. switch the Jack, Queen, Ace and King values with their equivalent numberic values
4. generate a random number that is represents a particular card Value
5. Show the card to which the card Value belongs
6. Create a condition according to which the player keeps getting random cards till the number of red cards[hears and diamonds] is equal to thenumber of black cards[clubs and spades]
7. calculate player score by adding the card values together


*/
//2.1
let CardDecksArray = [{
    card: 'spades',
    valuesArray: ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K']
  },
  {
    card: 'hearts',
    valuesArray: ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K']
  },
  {
    card: 'diamonds',
    valuesArray: ['A', 2, 3,...