Way2tutorial Snippet Editor
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JavaScript Array</title> </head> <body> <pre> <!-- Use pre element for work document.writeln() method --> <script type="text/javascript"> var vowels = ['a', 'e', 'i', 'o', 'u']; // Create array with values document.writeln('vowels[0] ', vowels[0]); // Access first value document.writeln('vowels[4] ', vowels[4]); // Access last value </script> </pre> </body> </html>