Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a javascript function called, displayEachRegNumber, that takes a list of registration numbers and displays each registration number in the list on a new line.

Write a javascript function called, displayEachRegNumber, that takes a list of registration numbers and displays each registration number in the list on a new line.

These asserts will test your function

The code below be executed against the function you wrote when you press the Execute code button.

displayEachRegNumber(['CY 123 456', 'CL 876 895', 'CK 456 765', 'CA 345 673'])

//['CY 123 456', 'CL 876 895', 'CK 456 765', 'CA 345 673'] assert.equal('CY 123 456', logList[0]); assert.equal('CL 876 895', logList[1]); assert.equal('CK 456 765', logList[2]); assert.equal('CA 345 673', logList[3]);

logList = []; displayEachRegNumber(['CJ 123', 'CL 876']); assert.equal('CJ 123', logList[0]); assert.equal('CL 876', logList[1]);

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_2

Step: 3

blur-text-image_3

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions