Code Monkey home page Code Monkey logo

lab-101-js-localstorage's Introduction

Local Storage

The purpose of this project is to talk about Local Storage for Javascript.

Code

Get Item: window.localStorage.getItem('variable')
Set item: window.localStorage.setItem('variable', value)

Resources

A few Different sources that would be helpful for this lesson:

lab-101-js-localstorage's People

Contributors

vincentmaule avatar

Watchers

Erik Gillespie avatar  avatar

lab-101-js-localstorage's Issues

Project Feedback

Build a website that allows the user to switch between day and night color themes and remembers their choice

@egillespie Can you take a look at this? It's hosted here and meets the following criteria:

  • Includes a button that when clicked, will toggle the website between day and night themes
  • When a user changes the theme, their choice is remembered in localStorage
  • The class on the body element is always up-to-date with the current theme (either day-theme or night-theme) -- you can use document.body.setAttribute('class', 'some-class-name') to set the class on the body
  • When the body has the class day-theme, the background of the website is light-colored, with a darker color for the text
  • When the body has the class night-theme, the background of the website is a very dark color, with a lighter color for the text
  • Somewhere on the page, the user is told how many times they've visited the website (starting with 1 the first time)

Please let me know if these different ways I've used work for the website or not. If not, I will go ahead and use the method mentioned from the requirements of the website.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.