Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please help me with this coding challenge INSTRUCTIONS 1. First, declare a variable named myArray and assign it to an empty array. 2.

can you please help me with this coding challenge
image text in transcribed
image text in transcribed
INSTRUCTIONS 1. First, declare a variable named myArray and assign it to an empty array. 2. Now populate myArray with two strings: Put your full name in the first string, and your favorite color in the second. 3. Next, declare a function named cutName. It should expect a parameter name 4. cutName should return an array by breaking up the input string into individual words. Example: cutName("Douglas Crockford") should return ["Douglas", "Crockford"] Example: cutName("John B. Smith") should return ["John", "B.", "Smith"] 5. Declare a new variable named my Info and assign it to an empty object literal. 6. Add the following three key- value pairs to myInfo : Key: fullName Value: The result of calling cutName on the name string within myArray Key: favoriteColor Value: The color within myArray Key: github Value:If you have a github handle, enter it here as a string. If not, set this to null instead. CODE EDITOR 1 // Enter your code here INSTRUCTIONS 1. First, declare a variable named myArray and assign it to an empty array. 2. Now populate myArray with two strings: Put your full name in the first string, and your favorite color in the second. 3. Next, declare a function named cutName. It should expect a parameter name 4. cutName should return an array by breaking up the input string into individual words. Example: cutName("Douglas Crockford") should return ["Douglas", "Crockford"] Example: cutName("John B. Smith") should return ["John", "B.", "Smith"] 5. Declare a new variable named my Info and assign it to an empty object literal. 6. Add the following three key- value pairs to myInfo : Key: fullName Value: The result of calling cutName on the name string within myArray Key: favoriteColor Value: The color within myArray Key: github Value:If you have a github handle, enter it here as a string. If not, set this to null instead. CODE EDITOR 1 // Enter your code here

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

Students also viewed these Databases questions