Skip to content

Tag: arrays

BlackJack game in JavaScript

I was given this challenge for an interview process and I have been trying to solve it correctly. On the console, the function returns undefined and sometimes just runs until (samPoints += getRandomCard()); Would you help me identify what I am doing wrong? These are the instructions: Model the game create a s…

How to sum duplicated values inside array in order

I need some help to sum values inside an array in order I have two arrays: I’m using this code below to remove the duplicated values inside array1: What I need is to sum the values of array2 using the order of array1, so I will have this result: So the final result would be this: Any suggestion ? thank

Order array alphanumercially and with a condition

I am trying to reorder an array by two conditions. Making sure that Pos 10 goes after single digits and that it follows a specific order after that. I tried to give priority to the string that includes first but then if I want to order alphanumerically it resets A to the top. How could I optain the expected r…