css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


<p>Η μέθοδος toString() επιστρέφει ένα πίνακα σαν κείμενο.</p>
<p id="test1"></p>

<p>Η μέθοδος join() επιστρέφει πάλι ένα πίνακα σαν κείμενο αλλά μπορούμε να ορίσουμε τον ενδιάμεσο χαρακτήρα .</p>
<p id="test2"></p>
<p>Η μέθοδος pop() αφαιρεί το τελευταίο στοιχείο ενός πίνακα και το εμφανίζει.</p>
<p id="test3"></p>

<p>Η μέθοδος push() προσθέτει ένα νέο στοιχείο στο τέλος ενός πίνακα και εμφανίζει το μέγεθος του.</p>
 <button onclick="Function1()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test4"></p>
<p>Η μέθοδος splice() προσθέτει νέα στοιχεία σε συγκεκριμένη θέση. (θέση 2, αριθμός στοιχείων που θα αφαιρεθούν 0) .</p>
 <button onclick="Function3()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test5"></p>

<p>Η μέθοδος sort() ταξινομεί αλφαβητικά ένα πίνακα.</p>
 <button onclick="Function4()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test7"></p>
 <p>Η μέθοδος reverse() αντιστρέφει τα στοιχεία ένος πίνακα. Σε συνδυασμό με τη sort() έχουμε φθίνουσα ταξινόμηση.</p>
 <button onclick="Function5()">ΔΟΚΙΜΑΣΤΕ</button>
<p id="test8"></p>

              var fruits = ["ΜΗΛΟ", "ΠΟΡΤΟΚΑΛΙ", "ΚΕΡΑΣΙΑ"];
document.getElementById("test1").innerHTML = fruits.toString();
document.getElementById("test2").innerHTML = fruits.join(" | ");
document.getElementById("test3").innerHTML = fruits.pop();
function Function1() {
    document.getElementById("test4").innerHTML = fruits;
function Function2() {
    document.getElementById("test5").innerHTML = fruits;
var cars = ["OPEL", "FIAT", "MERCEDES"];
document.getElementById("test6").innerHTML = cars;
function Function3() {
    cars.splice(2, 0, "LANCIA", "CITROEN");
    document.getElementById("test5").innerHTML = cars;
function Function4() {
    document.getElementById("test7").innerHTML = cars;
function Function5() {
    document.getElementById("test8").innerHTML = cars;

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................