Single Linked List JavaScript implementation
This doesn't appear to function correctly right now so it may actually belong on Stack Overflow rather than on Code Review.

Regardless, here are the issues I'm seeing:


When you attempt to add values to the head of the list, they instead are getting added to the tail of the list since the head of the list is always null. The new value should always end up as the head of the list when it is added to the head of the list.
Your code is a bit visually confusing since you are using this to refer to 2 different objects in the same code block.
You are only incrementing the count of the list's elements inside the part of the addToHead which is unreachable, resulting in a count of null regardless of what you do. Instead the count should be incremented on any add interaction.
There doesn't seem to be an interaction to remove an item from the list, either front or back. Being able to remove items from the list is a core part of the functionality.


For the full definition of what a singly linked list needs to support, see this page.