If you are new to Construct, I suggest you start programming with event sheets. It feels awkward at first, but you'll quickly get used to it.
You can write code in JS, but not all Construct features are available in scripts, so it will be difficult to make a complete game like this. Check out the documentation and templates on scripting.