It's transforming the array into an object with each key being a value in the array, which is then used below to more elegantly check if the signal received is there or not. It can be done with just an array so I can remove this if you want.