Skip to content

Compare value of two arrays

Five random numbers(from numbers array) will be shown one by one and we need to recall last four number by clicking the number. The answers are push to answer array after clicking. Now i need to compare answers array and number array to calculate the score. My problem is in scoring logic which is not working …

Vscode move line above a block shortcut key

Is there any shortcut key to move a line above or below a block? This feature exists in IntelliJ editors and maybe also in visual studio. You can use Alt+Up to move a line up one line. Is there any such shortcut key to move the line above an entire block above? In the example below, it’s to move the

Manipulating an API response to have part of the Object as a Key?

I have data that comes back from an API as an array of Objects. rather than just returning that, return data, I’d like to have it where the name is the key so that I can do a lookup on data, like data[“Jim”] and get the object back. how can I manipulate the data to come back that way after