-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Reorder Scripting test your skills for consistency #42963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorder Scripting test your skills for consistency #42963
Conversation
|
Converting to draft until I've looked through the review at #42953. |
dipikabh
left a comment
There was a problem hiding this 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: |
There was a problem hiding this comment.
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?
| 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)"
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The finished output should look like this: | |
| After you complete the task, the output should look like this: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The finished output should look like this: | |
| The output should look like this: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The starting point of the task looks like this: | |
| The starting point of the task looks like this (starts empty): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping the "Also"
| 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
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