2D Movement. How to create a script for it?

I would like help for creating a 2D movement script. If you can lend me one that would be great! But I would like some tips for helping me get back on my feet on javascript again.

You can use the p2 engine if you need a physics engine in game.

If not then just fix the z axis to 0 and move your character in 1 dimension like x and for jump use y.