Download presentation
Presentation is loading. Please wait.
Published byBrendan King Modified over 9 years ago
2
Inside attributes like onclick As a section of code in the body Only special cases As a function in a separate file Can link to it like the css We will use
3
Collection of statements that can be invoked as a unit Can take parameters Can be used multiple times Can call without knowing what they do or how
4
function name() { stmt; }
5
Myscript.js JavaScript option in komodo note that it’s an empty file but it can help you do NOT include the script tag
7
function name(parm) { stmt; }
8
Name is a placeholder Can be used anywhere in a function Can be used as many times as you want Can not change it MUST supply value when call Can be different everytime
9
HTMLJS mypet(‘cow’); mypet(‘dog’); function mypet(pet) { alert(‘my pet: ‘+pet); }
10
Order matters Need different names
11
HTMLJS mypet(‘Mutt’,’Jeff’); mypet(‘Jeff’,’Mutt’); function taller(big,small) { alert (big+’ is taller than ‘+ small); }
12
Jsbin is just like jsfiddle but it allows you to see the console Console.log( message );
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.