Giter VIP home page Giter VIP logo

js-lista-spesa's Introduction

Creare una lista della spesa con ciclo while inserendo elementi nel dom da JS.

1: Creare una struttura di base nel HTML per inserirci in futuro elementi da JS.

2: Creare un array di elementi (oggetti da comprare x spesa).

3: Impostare delle variabili uguali agli indici dell'array per comodità e sopratutto il valore 0 alla i.

4: Impostare un ciclo while con la condizione che svolga il suo ciclo fino a che la i non è <= al array.lenght.

5: Successivamente impostare il codice per far si che crei un elemento nel dom e tramite l'interpolazione ad ogni aumento di valore della i corrisponda l'inserimento di un elemento del array nel HTML.

6: Per evitare che si rompa il tutto inserire che quando la i raggiunge il numero dell'ultima posizione dell'array finisca il ciclo.

7: Se tutto funziona possiamo dedicarci al CSS.

js-lista-spesa's People

Contributors

leosallu avatar

Watchers

 avatar

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.