Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice JavaScript Math Methods!
You have completed Practice JavaScript Math Methods!
Preview
See one possible way to program the solution to this practice challenge.
More Practice
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
then try to recreate it yourself.
0:00
In step one is to link
the JavaScript file to the webpage.
0:00
The script tag is how you do that.
0:03
Just add the source attribute and
provide the path to the file.
0:05
The JavaScript file is
in a folder named js,
0:08
which is at the same level
as the index.html file.
0:11
So the path leads into that folder and
into the file math.js.
0:14
So the path is js/math.js.
0:18
Step two, I add an alert dialogue
box to announce the program.
0:25
In step three, we create a variable and
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up