An Introduction to JavaScript Flashcards
javascript was created for what
scripting in the browser
is javascript dynamic
yes meaning you can update elements on the fly
javascript has properties of what two types of languages
oo and functional
can u use js server side?
yes
creating a javascript script
‘script type=”text/javascript”’
window.alert(“hi”);
‘/script’
what does the type signify in declaring a javascript type=”text/javascript”
that everything inside is of type javascript
good practice is to do what
put js code at end of page
write line in js
writeln();
declare a variable
var i=1;
can you execute a js file outside of a browser
yes, using something like jsdb
how to comment in js
single line //
multiline /*
*/
inline comments are available
global variable how to
omit the var and just assign a name to a value
how does var know its type
it is inferred based on what is passed to the variable
get the type of a variable
typeof x;
write a function in js with params and return value
function f(params){return params;}