Код (Text): <!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"/> </head> <body class="bo1"> <!--Тут вводные "жилище, порядковыйномер, адрес, цена, количество кв метров "--> Asunto: <input id= "asunto"/> </br> kohdenumero: <input id= "kohdeNumero"/> <br/> osoite:<input id="osoite"/> </br> hinta:<input id= "hinta"/> </br> pinta-ala:<input id="pintaAla"/> </br> <div id= "tulostusAlue"></div> </br> nelio hinta:<input id ="nelioHinta"/> </br> <button onclick="lisaa();">Lisää asunto</button> <button onclick="tulostaKaikki();">Tulosta kaikki</button> <button onclick="haeAsunto();">Hae asunto</button> <!--посчитать цену за кв метр--> <button onclick="laskeNelioHinta();">Laske nelio hinta</button> <script> // добавить let asunnot = []; function lisaa (){ let asunto = document.getElementById ("asunto").value; let kohdeNumero = document.getElementById ("kohdeNumero").value; let osoite = document.getElementById ("osoite").value; let hinta = document.getElementById ("hinta").value; let pintaAla = document.getElementById ("pintaAla").value; asunnot.push(asunto, kohdeNumero, osoite,hinta,pintaAla); } // вывести на экран . Должно выводить всю инфу о жилище function tulostaKaikki(){ let tulostus = ""; for (let i = 0; i < asunnot.length; i++){ tulostus += "<br/>" + asunnot [i] } document.getElementById ("tulostusAlue").innerHTML = tulostus; } // найти function haeAsunto(){ let tulostus = asunnot [i]; for(let i =0;i <asunnot .length;i++){ if(asunto == asunto[i]) document.getElementById("tulostusAlue").innerHTML = asunnot; } } // посчитать цену кв м constructor ?? function laskeNelioHinta (){ this.hinta = hinta; this.pintaAla = pintaAla; return this. hinta / this. pintaAla; } </script> </body> <link rel="stylesheet" href="talo1.css"> </html>