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.

<p>Δημιουργία array, και εισαγωγή τιμών:</p>
<h3 id="test1"></h3>
<p>Objects χρησιμοποιούν ονόματα για την προσπέλαση των στοιχείων:</p>
<h3 id="test2"></h3>
<p>Βρείτε το μέγεθος ενός πίνακα με την ιδιότητα length:</p>
<h3 id="test3"></h3>
<p>Η μέθοδος push προσθέτει ένα νέο στοιχείο</p>
<button onclick="Function1()">ΠΡΟΣΘΕΣΕ</button>
 <h3 id="test4"></h3>
<p>Προσπέλαση όλων των στοιχείων ενός πίνακα με τη χρήση της εντολής 'for'</p>
 <h3 id="test5"></h3>

              var cars = ["OPEL", "VOLVO", "BMW"];
document.getElementById("test1").innerHTML = cars[0];

var person = {firstName:"ΝΙΚΟΣ", lastName:"ΝΙΚΟΥ", age:52};
document.getElementById("test2").innerHTML = person["firstName"];

var fruits = ["ΜΗΛΟ", "ΠΟΡΤΟΚΑΛΙ", "ΚΕΡΑΣΙΑ"];
document.getElementById("test3").innerHTML = fruits.length;

var fruits_new = ["ΜΗΛΟ", "ΠΟΡΤΟΚΑΛΙ", "ΚΕΡΑΣΙΑ"];
document.getElementById("test4").innerHTML = fruits_new;

function Function1() {
    document.getElementById("test4").innerHTML = fruits_new;

var fruits, text, fLen, i;
fruits = ["ΜΗΛΟ", "ΠΟΡΤΟΚΑΛΙ", "ΚΕΡΑΣΙΑ"];
fLen = fruits.length;
text = "<ul>";
for (i = 0; i < fLen; i++) {
    text += "<li>" + fruits[i] + "</li>";
text += "</ul>";
document.getElementById("test5").innerHTML = text;
Loading ..................