This forum is now read-only. Please use our new forums! Go to forums
[resolved] Why won't my js code work on anything exept codecademy??(Windows 7)
This is my code:
var red = [0, 100, 44
];
var orange = [0, 100];
var green = [0, 101];
var blue = [0, 102];
var purple = [0, 103];
var myName = "Lincoln";
letterColors = [blue, red, green];
drawName(myName, letterColors);
bounceBubbles(myName);
if(10 > 3)
bubbleShape = "square";
I cant seem to be able to get my code to work on anything exept Codecademy. I was trying to use Notepad to paste the code onto and to save it as a js file, and I was trying to use Microsoft Windows Script Based Host to run the code. But continually got tons of syntax, Object Unidentified errors and so on. My code works with Codecademy But not with anything else.
Answer 5586f39576b8fe27ba000609
Answer 5588b211937676de460001f6
Save them all in the same folder and then edit the .html file so the 3 files (.css and both .js) are linked in-between the < head > and < /head > tags. Because they aren’t in separate folders you can just link the file names i.e. < DOCTYPE HTML > < head > < link rel=”stylesheet” type=”text/css” href=”**style.css**” > < script type=”text/javascript” src=”**jquery.min.js**”>< /script > < script type=”text/javascript” src=”**app.js**” >< /script > < /head >
You create index.html, style.css and app.js but will need to download jQuery (jquery.min.js) if you haven’t already done so. Remember to make sure to change the name of the file you link to this.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
5 comments
How do you get them to be linked together instead of four individual files that have nothing to do with each other.
I mean, how do you connect them??
I had to add as a new comment.
Also it might be worth you trying Notepadd++, it’s free. https://notepad-plus-plus.org/
Ok