Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor

Description

I got some feedback that the ordering of the "Test your skills" articles has become confusing since the last update. Specifically, in some of the tests, the "solution" live sample appears before the "starting state" live sample, so it is unclear which one to click on to start the test.

To remedy this, I have decided to go through all the "Test your skills" articles and make the structure as consistent as possible throughout, fixing the above issue in the process.

This PR in particular updates the structure of the Dynamic scripting with JavaScript "Test your skills" articles.

Note: Not all of the tests show the finished state of the example. I have elected not to show it in cases where the before and after rendering look no different, where the final rendering gives away the answer, and where the question is freeform so there is no single answer.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner January 29, 2026 09:16
@chrisdavidmills chrisdavidmills requested review from hamishwillee and removed request for a team January 29, 2026 09:16
@github-actions github-actions bot added the Content:Learn Learning area docs label Jan 29, 2026
@github-actions github-actions bot added the size/l [PR only] 501-1000 LoC changed label Jan 29, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

Preview URLs (10 pages)

Flaws (4)

Note! 6 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Learn_web_development/Core/Scripting/Test_your_skills/Arrays
Title: Test your skills: Arrays
Flaw count: 1

  • macros:
    • Macro ? produces link /en-US/curriculum/ which doesn't resolve

URL: /en-US/docs/Learn_web_development/Core/Scripting/Test_your_skills/Conditionals
Title: Test your skills: Conditionals
Flaw count: 1

  • macros:
    • Macro ? produces link /en-US/curriculum/ which doesn't resolve

URL: /en-US/docs/Learn_web_development/Core/Scripting/Test_your_skills/Functions
Title: Test your skills: Functions
Flaw count: 1

  • macros:
    • Macro ? produces link /en-US/curriculum/ which doesn't resolve

URL: /en-US/docs/Learn_web_development/Core/Scripting/Test_your_skills/JSON
Title: Test your skills: JSON
Flaw count: 1

  • macros:
    • Macro ? produces link /en-US/curriculum/ which doesn't resolve
External URLs (1)

URL: /en-US/docs/Learn_web_development/Core/Scripting/Test_your_skills/Variables
Title: Test your skills: Variables

(comment last updated: 2026-02-03 16:25:20)

@chrisdavidmills chrisdavidmills marked this pull request as draft January 29, 2026 18:45
@chrisdavidmills
Copy link
Contributor Author

Converting to draft until I've looked through the review at #42953.

@github-actions github-actions bot added size/xl [PR only] >1000 LoC changed and removed size/l [PR only] 501-1000 LoC changed labels Feb 2, 2026
@chrisdavidmills chrisdavidmills marked this pull request as ready for review February 2, 2026 11:18
@chrisdavidmills chrisdavidmills removed the request for review from hamishwillee February 2, 2026 11:18
@chrisdavidmills chrisdavidmills changed the title reorder Scripting test your skills for consistency Reorder Scripting test your skills for consistency Feb 2, 2026
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some minor suggestions.

Thanks a lot, Chris!


<!-- Example-specific code -->

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we indicate here that the empty frame is expected?

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (nothing is shown yet):

or "(it starts empty)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done; this is a good idea. I've repeated it in all other similar examples.

```

{{ EmbedLiveSample("arrays-1", "100%", 60) }}
The finished output should look like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The finished output should look like this:
After you complete the task, the output should look like this:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

2. Store the length of the array in a variable called `arrayLength`.
3. Store the last item in the array in a variable called `lastItem`.

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

```

{{ EmbedLiveSample("arrays-2", "100%", 60) }}
The finished output should look like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The finished output should look like this:
The output should look like this:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

3. Iterate over each item in the array and add its index number after the name inside parentheses, for example `Ryu (0)`. Note that we don't teach how to do this in the Arrays article, so you'll have to do some research.
4. Finally, join the array items together in a single string called `myString`, with a separator of `"-"`.

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


<!-- Example-specific code -->

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

2. Find the index position where `substring` appears in `quote`, and store that value in a variable called `index`.
3. Use a combination of the variables you have and available string properties/methods to trim down the original quote to "I do not like green eggs and ham.", and store it in a variable called `revisedQuote`.

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

2. In `fixedQuote`, replace "green eggs and ham" with another food that you really don't like.
3. There is one more small fix to do — add a period to the end of the quote, and save the final version in a variable called `finalQuote`.

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


The final task for now — in this case you are provided with some existing code, which has two errors present in it. The results panel should be outputting the name `Chris`, and a statement about how old Chris will be in 20 years' time. We want you to fix the problem and correct the output.

The starting point of the task looks like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The starting point of the task looks like this:
The starting point of the task looks like this (starts empty):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the "Also"

Suggested change
Check out [Practice time - Part 3: let and const](https://scrimba.com/learn-javascript-c0v/~059?via=mdn) <sup>[_MDN learning partner_](/en-US/docs/MDN/Writing_guidelines/Learning_content#partner_links_and_embeds)</sup> from Scrimba: An interactive challenge providing multiple tests concerning `let` and `const`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

dipikabh

This comment was marked as duplicate.

@chrisdavidmills chrisdavidmills merged commit b36d59a into mdn:main Feb 3, 2026
7 checks passed
@chrisdavidmills chrisdavidmills deleted the reorder-test-your-skills-4 branch February 3, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Learn Learning area docs size/xl [PR only] >1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants