katsparrow / homework

0 stars 0 forks source link

8.11.17 #4

Open ivchenkodima opened 7 years ago

ivchenkodima commented 7 years ago
<script>
        var person = {
            name: "eewx",
            surname: "eeee",
            age: "22",
            langs:[123]
        };
        var list = [];
        for( var i = 0; i< 11; i+=1){
            for(var j = 0; j< 11; j+=1){
                if((i+j)%2==0){
                document.write("<img src='./2.png' width='20' height='20' style='margin:5px'/>")    
                }
                else{
                    document.write("<img src='./1.png' width='20' height='20' style='margin:5px'/>")    
                }   
            }
            document.write("<br />");

        }
        // 0,0 0,1 0.2
        // 1,0 1.1 1.2
        // 2.0 2.1 2.2

        do{
            for(item in person){
                person[item]=prompt("Enter your "+item);

            }
            list.push(person);

        } while(confirm('repeate ones more?'))

        for(var o=0; o<list.length; o++){
            console.log(list[o])
        }

    </script>