- Study guides, Class notes & Summaries
Looking for the best study guides, study notes and summaries about ? On this page you'll find 1 study documents about .
1 results
Exam (elaborations)
Hack Reactor Module 1: Diagnostic Skills Check questions and answers 2023
Write a function 'transformFirstAndLast' that takes in an array, and returns an object with: 
1) the first element of the array as the object's key, and 2) the last element of the array as that key's value. 
 
Example input: 
var input = ['Queen', 'Elizabeth', 'Of Hearts', 'Beyonce']; 
 
Function's return value (output): 
{ Queen : 'Beyonce' } 
 
Do not change the input array. Assume all elements in the input array will be of type 'string'. 
 
Note that the input array may have ...