Qualcomm Interview Question

JavaScript fundamental Reverse linked list and print out