Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Accessing Individual Array Elements in Older Versions of JavaScript</title> </head> <body> <script> // ES5 syntax var fruits = ["Apple", "Banana"]; var a = fruits[0]; var b = fruits[1]; document.write(a); // Apple document.write("<br>"); document.write(b); // Banana </script> </body> </html>