CBSE 15. WEB SCRIPTING - JAVA SCRIPT (5 MARKS)

 

23. Creating an Array

JavaScript

<!DOCTYPE html>

<html>

<head>

<title>Array Example</title>

</head>

<body>

 

<script>

  var fruits = ["apple", "banana", "orange"];

</script>

 

</body>

</html>

This creates an array named fruits with three elements.

No comments:

Post a Comment