The above line has a syntax error. Looks like you have an extra space where it does not belong.
Also, you are missing the function declaration showing the parameters arr and size.
Your function should use a return statement to return the final expected array.
In the following line you attempt to use push on tempArray, but you do not actual call the function with a value ( missing (aValue) ).
Finally, the following line attempts to increment a count variable by 1, but you have not defined a starting value for count.
Fix these issues and you may or may not solve this challenge, but you will at least not have as many errors.
You really should write out your entire algorithm in plain language (no code) first, and make sure the steps you have written would result in the answer each tests expects. Once you feel your algorithm generates the correct answers, then (and only then) should you attempt to write code. As you are writing your coded solution, use your browser’s console (Ctrl+Shft+J in Chrome) to check for any errors your code may create.