cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <body>
<p>Πατήστε το κουμπί για να εκτελεστεί το τμήμα του κώδικα πέντε φορές.</p>
<button onclick="Function1()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test1"></p>
<hr>
<p>Πατήστε το κουμπί για να δείτε τα στοιχεία ενός πίνακα.</p>
<button onclick="Function2()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test2"></p>
<hr>
<p>Πατήστε το κουμπί για να δείτε την for in επανάληψη σε ένα object.</p>
<button onclick="Function3()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test3"></p>
<hr>
<p>Πατήστε το κουμπί για να δείτε την while  επανάληψη για i μικρότερο απο 10.</p>
<button onclick="Function4()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test4"></p>
<hr>
<p>Πατήστε το κουμπί για να δείτε την while  επανάληψη στα στοιχεία ενός πίνακα.</p>
<button onclick="Function5()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test5"></p>
</body>
            
          
!
            
              function Function1() {
    var text = "";
    var i;
    for (i = 0; i < 5; i++) {
        text += "ΑΡΙΘΜΟΣ " + i + "<br>";
    }
    document.getElementById("test1").innerHTML = text;
}

function Function2() {
  var cars = ["BMW", "Volvo", "Saab", "Ford"];
  var i, len, text;
  for (i = 0, len = cars.length, text = ""; i < len; i++) {
      text += cars[i] + "<br>";
  }
  document.getElementById("test2").innerHTML = text;
}

function Function3(){
  var txt = "";
  var person = {fname:"ΝΙΚΟΣ", lname:"ΝΙΚΟΥ", age:55}; 
  var x;
  for (x in person) {
      txt += person[x] + " ";
  }
  document.getElementById("test3").innerHTML = txt;
}

function Function4() {
    var text = "";
    var i = 0;
    while (i < 10) {
        text += "<br>ΑΡΙΘΜΟΣ " + i;
        i++;
    }
    document.getElementById("test4").innerHTML = text;
}

function Function5(){
    var cars = ["BMW", "Volvo", "Saab", "Ford"];
    var i = 0;
    var text = "";
    while (cars[i]) {
      text += cars[i] + "<br>";
      i++;
      }
    document.getElementById("test5").innerHTML = text;
}
            
          
!
999px
Loading ..................

Console