JavaScript

First Paragraph Tag


picofxeb












Array Play: ["Banana", "Orange", "Lemon", "Apple", "Mango"]






Pop


Push Custom Fruit



Sorting

Sorting Numbers: [40, 100, 1, 5, 25, 10]







Conditional (Ternary) Operator


Loop through array from above using for(x of array)

Loop through array from above using array.foreach


Change the types of objects: 0

Number



Mess with this.


Make Custom Car, Make & Model, Car Class (debugger and console added)



Getter and Setter, benefits are to be able to get the data and manipulate it so it doesnt change the object, also simpler syntax


JavaScript Closures

Counting with a local variable. "private variables, not global"

0

Asynchronous actions

Load an html file

JavaScript Callbacks

Find different elements of the DOM


Animation!!

Event Handling tips and tricks

Bubbling:

Click me! Inside gets read first then outside



Capturing:

Click me! vise versa



Add Elements using Script

Here we have a DIV, we can append and remove children:





Time to play with cookies again, typically cookies will last until/n the user exits the program. However this is modified to last 30 days

AJAX DEV

Change this content using the XMLHttpRequest. This is on AWS server. Most likely still getting CORS error :?

Not AJAX but just a file reader. for ones local machine aka MINE


The XMLHttpRequest Object

JSON DEV

Sending Data --> JSON.stringify() , Receiving data --> JSON. parse()

Below is an example of how to store on your local machine and to store through session, session is lost after browser is closed





This is where the data should be changed. Will need further tutorials about JSON and PHP




Using JSON with PHP Server


Using JSONP, this works around that PESKY CORS. Get the PHP file names jsonp_demo, loaded upon entry


WEB API

Application Programming Interface

The browser has a location API built in


JQUERY

Finding HTML Elements by Id

Using JQUERY to find and maniplate DOM elements

Hello World!

Hello Sweden!

Hello Japan!


4

x

5


A + B =

Change style using JQUERY