using javascript in html

So I started using javascript and html to make website and thought it be fun to convert my java games to javascript and place them on my website. I wrote code trying to see my javascript game from the html webpage, but i only see a white screen whenever i pull it up.
here the html code:

<!doctype html>

<title>Space Invaders</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 
<script src = "spaceInvaders.js"></script>

here the java script code:

function setup(){
  createCanvas(400,400);
}

function draw(){
  background(0);
}

@ctrembla – This is a forum for Processing / p5.js.

Are you using Processing, and are you trying to write p5.js using the Processing PDE editor? You don’t say anything about how your spaceInvaders.js game was coded, and all I see in your code is JQuery.

Like @jeremydouglass said, I don’t see anywhere in your HTML where you include the P5.js library.

Shameless self-promotion: here is a guide on putting together a Hello World program in P5.js:

I solved it on another chat.

@ctrembla – …so, was it a Processing question? Or just JavaScript / JQuery?

I’m glad you got it figured out. Can you also post the answer here so other people with similar problems in the future will be able to learn? Also if you posted to another site please link between crossposts.

it was javascript. Thanks for the reply will post soon.
solved here: