Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVASCRIPT 13 ARRAY 04 A. INSTRUCTIONS SPLIT STRING TO ARRAY - RETURN VALUE FROM ARRAY OBJECTIVE Practice creating and using arrays. In E-BOOK SEARCH FOR

JAVASCRIPT 13 ARRAY 04

A. INSTRUCTIONS

SPLIT STRING TO ARRAY - RETURN VALUE FROM ARRAY

OBJECTIVE

Practice creating and using arrays.

In E-BOOK SEARCH FOR AND READ

split <== This is what this assignment is about. Search for this and read carefully and completely.

delimiter

arrays

get value from array

do not change parameter values

parameter <== This has an important reminder about never changing parameter values

return value from delimited data <== This has a full example for you to study. READ THIS!

NOTICE

These instructions are deliberately brief. The intent here is to allow you to demonstrate what problem solving and programming skills you have mastered.

You can do this in 2 or 3 lines of code. No loop is used here.

CREATE javascript 13 array 04.js (there is no HTML page)

DO THIS

1. Create javascript 13 array 04.js with a general function: animal() with three parameters:

delimiter

data (this is a delimited list of animals)

arrayIndex

All three parameters must be used in your function. Did you search for and read in e-book: do not change parameter values

2. The function will do this:

a. Split data into an array.

b. Return the array value at position arrayIndex.

TIPS

Do not give the parameters values. Use all three parameters.

If you want to test: After the end of your function, after }; use alert(animal(a,b,c)) where a,b and c are legitimate parameter values. If you do this:

The first two values are strings so you need quotes. The 3rd is a number.

Click GO to test.

Remove this alert() after you test before you GRADE.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago