JavaScript Queue Attempt #2
Looks good!

I'm a bit surprised the linter didn't catch redundant semicolons at the end of some function declarations, for example here:


  function getSize() {
    return size;
  };



I would rename all the local variables and function parameters named x to data.

In enqueue, you could inline the newNode variable,
and assign the object literal {next: head, data: data} directly to head.

It would be good to test a bit more thoroughly,
for example dequeue everything from a non-empty queue,
and performing a mix of enqueue and dequeue operations.