why use java script?
adds interactivity and visual enhancement
java mainly used for
client-side scripting
using java with client-side scripting means that there’s no _____
internet traffic or server processing of client requests
java cons
t/f: javascript is the same as JAVA
false
JavaScript is not JAVA because:
what java can do (client-side):
CSS can handle (Java not necessary):
java script can achieve (that CSS can’t):
2 places to put JavaScript
under title in HTML head, put Java in its own file
how to embed Java in HTML
under title in script element in head section
<script> CODE GOES HERE </script>
</head>
t/f: JavaScript code can be inserted anywhere in HTML, including the body
true
t/f: there are limits on how many script tags can be embedded in the HTML code of a web page
false
how to put javascript in its own file
<head>
<title></>
src attribute of script element specifies
the URL of external code source
which way to use java is the best way for code reuse
putting java in own file
valid variable names consist of
letters, digits, underscores, and dollar signs
valid variable names do not begin with
a digit, not a reserved java keyword
t/f: java is not case sensitive
false
what statement declares a variable
var or let
var varName = 1;
java variables have ____ data types
dynamic
what is var cars = [“Saab”, “Volvo]
array
what is var x = {firstname:”John”, lastname:”Doe”};
object
%
modulus (remainder)