AllThingsNetwork.org Logo

Security Simplified



Loops, Conditional Statements, Functions, Variables, Parameters, Arrays, Associative Arrays

Stored Data

Javascript Code

var storedNames = JSON.parse(localStorage.getItem("names"));
var storedCourse = sessionStorage.getItem("course");
var car = JSON.parse(localStorage.getItem("car"));
document.writeln("

JSON

names: " + localStorage.getItem("names") + "

"); document.writeln("

course: " + sessionStorage.getItem("course") + "

"); document.writeln("

car: " + localStorage.getItem("car") + "

"); document.writeln("

Parsed Variables

storedNames: " + storedNames + "

"); document.writeln("

storedCourse: " + storedCourse + "

"); document.writeln("

car:

Make: " + car.make + "
Model: " + car.model + "
Year: " + car.year + "
Color: " + car.color + "

");