[noob]How do I spawn objects with javascript

I want to make a gun in my first game, but I need to make bullets, I know javascript the best so how could I do that? :?:

PS: How can I make objects other than cubes, cylinders, etc. (like a tree)?

PPS: what is the event for arrow keys?

Hey ars,

Check out my video tutorial on this subject at: Yilmaz Kiymaz – Indie Game Developer

Let me know if you have any questions.