Newbie problem Javascript

So i am having a problem. I am currently doing the portfolio project, i am doing a matrix-code-rain style background for my nav bar.
Now all works fine, but when i resize the window the size of the canvas stays the same. I tried something at the end of the JS code, but i am having diffculties changing the canvas size on resizing.
My code:

Try adding height: 100vh; to the body css.

Oh, wow that is fantastic. It works. Do you mind if i ask you another question? How would i go on about removing this rain effect on mobile size?