diff --git a/.instructions/2. core exercises.md b/.instructions/2. core exercises.md index 2bb0302..41fab6b 100644 --- a/.instructions/2. core exercises.md +++ b/.instructions/2. core exercises.md @@ -47,10 +47,10 @@ Let's start by running the application to learn what it does. 3. Add a new line below this comment and type the following two lines. You should see GitHub Copilot start to autocomplete the second line as you type. When you see this, just press ```TAB``` to accept the completion. -``` ``` -``` ``` +``` ``` +``` ``` -Your finished snippet should match the following. +Your finished snippet should match the following. If not, see how you can ask Copilot to revise the line by specifying the funciton name `operationPressed`. GitHub Copilot suggestions @@ -64,7 +64,7 @@ Your finished snippet should match the following. 8. Start typing the following line and notice that GitHub Copilot should start to offer code completion half way through the word "power" as you're typing. Press **TAB** to accept the suggestion. -```'power': function(a, b) { return Math.pow(a, b) },``` +```'percentage': function(a, b) { return (Number(a) / 100) * Number(b) },``` 9. Open the ```public/client.js``` file in the editor window. @@ -86,7 +86,7 @@ Your completed addition should match the following. 14. Enter ```npm start``` in the terminal window and press **ENTER** to run the application. -15. You should test the new button by clicking 3, then the "^" (power) button, then click 2. Click "=" and the result should be 9. +15. You should test the new button by clicking 5, then the "%" (percentage) button, then click 10. Click "=" and the result should be 0.5. You might want to ask for a rounding for the result too. 16. Close the browser window, return to the Terminal window in Codespaces and press ```CTRL+C``` to terminate the application. diff --git a/assets/Add-operator-completed.png b/assets/Add-operator-completed.png index 237bd6f..c6a4c6a 100644 Binary files a/assets/Add-operator-completed.png and b/assets/Add-operator-completed.png differ diff --git a/assets/case-suggestion.png b/assets/case-suggestion.png index 27324c8..0bab948 100644 Binary files a/assets/case-suggestion.png and b/assets/case-suggestion.png differ diff --git a/assets/index-html.png b/assets/index-html.png index c8a3aab..67d57d0 100644 Binary files a/assets/index-html.png and b/assets/index-html.png differ