This forum is now read-only. Please use our new forums at

Animate Your Name Forum

View Course » View Exercise

373 points
Submitted by
Ignacio Juan Diaz
over 3 years ago

1/15 ReferenceError: drawName is not defined

In the first exercise "Preview" shows "ReferenceError: drawName is not defined".
I don't change anything. I reset the code and refresh the web, but nothing. Just appears the same error.


var myName = "Codecademy";

var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];
var letterColors = [red, orange, green, blue, purple];

drawName(myName, letterColors);

if(10 < 3)
bubbleShape = 'square';
bubbleShape = 'circle';



<!DOCTYPE html>
    <script type="text/javascript" src="//"></script>
    <script type="text/javascript" src=""></script>
    <canvas id="myCanvas"></canvas>
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src="main.js"></script>

If anyone knows what the problem is please answer. Thanks.

2 votes


In the html tab, the code originally specified an "http://" address for the urls, giving me the reference error mentioned. Changing the urls for the alphabet.js and bubbles.js libraries to start with "https://" solved the problem, for me at least.

1334 points
Submitted by
about 3 years ago

1 Comment

9f53374bfbd80053c4aada459add8620?s=140&d=retro nwcarpenter over 2 years ago

thanks! adding in the "s" worked for me as well

2 votes


I have the same problem with Chrome. I allowed the script, but still does not work.

471 points
Submitted by
Amanda M Essenmacher
almost 3 years ago

1 vote


Hi Ignacio, this does not happen on my machine. Could you give some details on what operating system and browser you are using please?

3698 points
Submitted by
over 3 years ago


E46f33ee3e13dac3e0df0185f998d2cc?s=140&d=retro Ignacio Juan Diaz over 3 years ago

I'm using Chrome ( VersiĆ³n 36.0.1985.125 m)also prove it on Internet Explorer 11, and my OS is Windows 7 Professional 64 bits.

55df2afa95e3787b9200005e_359368177 Judy over 3 years ago

That is what I'm using as well. I will have to think about what else I can suggest.

0a4f359b89f3e96bdfcaec30a68e33a0?s=140&d=retro 5733p about 3 years ago

I get the same problem using Firefox on Windows 7 Pro 64bit

1 vote


Make sure you allow javascript from and When I had javascript blocked for those sites through the NoScript add on for Firefox, I got the error. As soon as I allowed scripts from that site, the error went away.

511 points
Submitted by
about 3 years ago

1 Comment

55df2afa95e3787b9200005e_359368177 Judy about 3 years ago

Nice find!