Tag Archives: js

Stuff they don’t tell JavaScript noobs: Making your arguments optional

One thing that took me a while to grasp fully when it came to programming was passing arguments to functions. I don’t know why but it was one of those things that I just got one day. But something that … Continue reading

Posted in javascript | Tagged , , | 3 Comments

Draw a rectangle using the mouse on the canvas in less than 40 lines of JavaScript

One thing that is a lot easier than people think is using the mouse to interact with the canvas tag. To show how easy, I wrote some code that allows a user to draw a rectangle on the canvas. This … Continue reading

Posted in javascript | Tagged , , | 3 Comments

Stuff they don’t tell JavaScript noobs: Convert a string into a variable name

Hey, I said this might turn into a series and it’s turned into a series of two! Last week, I put up a post about creating something you’d usually use jQuery to write using pure JavaScript. And as usual, I … Continue reading

Posted in javascript | Tagged , , | Leave a comment