Treehouse: Grow your CSS skills. Land your dream job.

Which Language is this?

  • # March 20, 2013 at 8:58 am

    I saw these codes somewhere, and the demo showed a moving circle.
    I copied the codes and quickly created an html document and pasted the codes inside thinking it is js, but it didnt run. Which language was used to do that?

    var x = 20;
    var speed = 3;

    var draw = function() {
    background(202, 255, 97);

    fill(66, 66, 66);
    ellipse(x, 200, 50, 50);

    x = x + speed;

    # March 20, 2013 at 9:03 am

    It looks like JS, you’re probably missing some library that defined those functions.

    # March 20, 2013 at 11:34 am

    It could be:

    # March 20, 2013 at 4:11 pm

    I believe it is JS, but it’s not all of it. It would be easier to say for sure if the entire code was there. Yes, this is only a part, not the full script. It’s the size and speed of an oval being filled with color, however there is no mention of an event behavior, so maybe a possible animation of some sort…

    # March 20, 2013 at 4:12 pm

    It won’t do anything because there is no trigger, listener, event of any sort specified.

    # March 21, 2013 at 7:00 am

    Here is the [source]( “”)

    # March 21, 2013 at 7:09 am

    Looks like it’s a series. It’d probably make more sense if you start from the first tutorial, where ever that is.

    # March 21, 2013 at 7:56 am

    There are using this:, as explained in some hard to find [introduction video](

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.