JavaScript

Home > Preview

The flashcards below were created by user Kimmiey on FreezingBlue Flashcards.


  1. Why Javascript?
    Adds interactivity and visual enhancement
  2. Javascript is mainly used for
    • Client-side execution
    • Processing client requests that do not require server processing
    • No internet traffic
  3. Cons of Javascript
    • The client may not have enough processing resources
    • Javascript can be turned off for security reasons
  4. Origins of Javascript
    • Developed by Netscape - Mocha, LiveScript
    • Netscape and Sun collaborate - JavaScript (1994)
    • Microsoft creates Jscript
    • ECMAScript is now the "standard"
  5. Difference between JavaScript and Java
    • No graphical user interface
    • No read/write file access on clients
    • Not a class-based object model
    • No multithreading
    • Do not need the Java Virtual Machine (needs a browser)
  6. What can JavaScript do on the
    • Client side
    • Control browser features
    • Modify document appearance
    • Modify document content
    • Store & use information about user
    • Manipulate images
    • React to state of browser and client system
  7. When to use Javascript
    • CSS
    • Hover and focus events
    • Image swaps
    • basic animation
    • Drop-down menus
    • Javascript
    • Visual enhancement that CSS can't do
    • Advanced animation
  8. Where does one's Javascript code go?
    • Embedded in HTML
    • In it's own file - best way for code reuse
  9. Development environment
    • Text editor or HTML editor
    • Browser to run and debug code
  10. Variables
    • Valid variable names consist of letters, digits, underscores and dollar signs
    • Do not begin with a digit
    • Case sensitive
    • declared with var
  11. Dynamic Variable Types
    Like number, string, array and object
  12. Arithmetic operators
    • + addition
    • -subtraction
    • *multiplication
    • /division
    • %modulus (remainder)
    • ++ increment
    • --decrement
  13. Date Method
    • getHours (0-23)
    • getDay (0-6)
    • getDate (1-31)
    • getMinutes (0-59)
    • getMonth (0-11)
    • getFullYear (yyyy)
  14. Output's in Javascript
    • window.alert() - popup message box
    • document.writeln() or document.write()
  15. Inputs in Javascript
    • window.prompt() - input box
    • confirm() - ok/cancel box
  16. Debugging in Javascript
    • console.log()
    • Console.error()
  17. Javascript built in functions
    built in method of performing common math calculations, string manipulations, date and time manipulations, and manipulations of collections of data called arrays
  18. 3 ways to return control to the point at which the function was invoked
    • Reaching the function-ending right brace
    • executing the statement return;
    • Executing the statement "return expression;" to return the value of expression to the caller
  19. A function without a name
    Anonymous function
  20. A function can be considered as an _______ and referenced by a variable
    object
  21. What is an array
    • a group of variables that have the same name and normally are of the same type
    • Array contains elements
  22. First element in an array is the
    zeroth element
  23. Used to create an array and specify the number of elements in an arrary
    • New operator
    • var n1 = new Array(3)
    • var n2 = ["Ford", "Toyota","Honda"]
  24. Javascript events
    Allow scripts to respond to user interactions and modify the page accordingly
  25. Events and event handeling
    help make the web application more dynamic and interactive
  26. Load event
    • window object's load event fires when the window finishes loading successfully
    • Every DOM element has a load event but the window one is most commonly used
  27. A function that responds to an event
    Event handler
  28. Assigning an event handler to an event on a DOM node is called
    registering an event handler
  29. Mouse event
    • Mouseover - curser enters an element
    • Mouse out - curser leaves element
  30. <iframe> tag indicates
    there is a window object for the HTML document, and one additional window for each frame
  31. Common window methods
    • alert() 
    • setTimeout() - calls function a specificed number of miliseconds
    • setInterval() - calls a function at the specified intervals
  32. writeln()
    writes a line of output to the document (adds new line at the end)

Card Set Information

Author:
Kimmiey
ID:
325496
Filename:
JavaScript
Updated:
2016-11-09 00:56:25
Tags:
Java
Folders:

Description:
Java
Show Answers:

Home > Flashcards > Print Preview