Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Glasgow, Scotland Class 5-Tandy-Nicole-JavaScript-Core-2-Week-1#143

Open
Tandy-Nicole wants to merge 42 commits intoCodeYourFuture:update-mandatory-exercisesfrom
Tandy-Nicole:main
Open

Glasgow, Scotland Class 5-Tandy-Nicole-JavaScript-Core-2-Week-1#143
Tandy-Nicole wants to merge 42 commits intoCodeYourFuture:update-mandatory-exercisesfrom
Tandy-Nicole:main

Conversation

@Tandy-Nicole
Copy link
Copy Markdown

@Tandy-Nicole Tandy-Nicole commented Oct 25, 2021

  • Your Name: Tandy Nicole
  • Your City: Glasgow
  • Your Slack Name: Tandy Nicole

Homework Details

  • Module: JavaScript Core 2
  • Week: 1

Notes

- What did you find easy?
I found the Exercise 4 (Water Bottle) the easiest. most exercises including 6, 7, 9 and 10 I found them easy and straigh forward. Using console.log and getting the required output was straight forward. Creating arrays, a function within and if statements was easy. For example, in Exercise 9 (Budget List) I created an array first, then function without a code and insert console.log(). I then created a variable 0 and used a for. Each loop to go in the objects of the array. This array will fetch each individual budget and using the return total I am able to find the total.

In Exercise 10 (Cheap dinner) I found myself having to think a lot more and I opted to use a different strategy. I started by tackling the null condition using the if statement to return nothing. Then I went to sort out the prices and then the cheapest prices. I created lots of different if statements then I went to embed them together. I also used the comparing functions and array to locate the cheapest price.

- What did you find hard?
I updated my node.js and npm via terminal but I struggled to use certain functions such as ‘arrow function (=>)' because my vs code kept stating that this is only available in ES6 (esversion: 6). In Exercise 1 (Writers) I also faced a lot of bumps regarding syntax errors especially after console.log(). I spent quite sometime working on my syntax notations and this is an area of improvement required. Upon running the npm test I noticed that I failed 2 tests in Exercise 2 and Exercise 3. I couldn't rectify the problem but the code is working.

In Exercise 3 (Journey Planner) I kept receiving this message const and let 'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). I still did not understand what is wrong with this. After completing my code and inserting console.log(), I was able to retrieve the output.

In Exercise 4 (Water bottle) after running the npm test states that no test found. No test has been installed despite me running npm install before running the test.

In Exercise 5 (Groceries) I was unable to use other functions eg. flat function. Not sure if there is something wrong with my setup. I passed 2 and failed 1 exercise after running the npm test. The expected list did not match the received list. The issues is between the ingredient “Banana” and “Ananas”. I could not rectify this but the code is working.

In Exercise 8, the question asked for 5 books and there was no instructions directed to which specific books. I used my own books. After running the test, I noted that the test failed because I the question wanted the books listed in the test output. I had spent a lot of time trying to perfect the code, so I left it at that. Initially, I found creating an if statement inside the function challenging , however I mastered the technique. After going through my fundamentals modules, and researching online.

- What do you still not understand?

I was unable to start and complete Exercise 11. Will do so this coming week.

- Any other notes?
Would like help with my npm software or Es6 version on my laptop. I use Linux.


View rendered .github/pull_request_template.md
View rendered HOW_TO_MARK.md
View rendered README.md

40thieves and others added 30 commits February 7, 2021 16:25
…tory-exercises

Clarify instructions for 3-groceries.js
This re-enforces the idea of nested objects and helps to give a cleaner solution with object square bracket notation
The comments and prompts all use lower-case, and I feel like there's
enough for the trainees to be thinking about without having to think
about case-normalisation...
When I didn't guard setting `this.currentRoom` in `move`, the error
message told me to make sure my `start` method was correct. While
"Sometimes the error message is misleading" is a good thing for our
trainees to learn, I'm not sure this is the place, as there's already a
lot of new things to grasp in this exercise.
…rises

Add new exercise: "Choose Your Own Adventure" game
Fix incorrect room objects in choose-your-own-adventure exercise
Add writers on edge-cases of age range
…nsensitive

People I Know test case is order-insensitive
I wasn't sure where to sit on the balance of hard-coding answers vs
giving potentially copyable parts of a solution in the tests... This is
where I settled :)
Some of the exercises in JS1 week 3 are better expressed with objects
than arrays - recap them now that the trainees know objects.
Chris Owen and others added 12 commits May 13, 2021 16:41
groceries: Fix wording
Reading list: Re-add (accidentally?) removed instructions
- Added instructions for running in README
- Added tests for calls to console.log in 1-writers and 8-reading-list
- Clarified 6-people-I-know to distinguish friends and colleagues, rather than my friends and their friends
- Added functions to be callable from tests where relevant
- Did not cover 4-water-bottle, 7-recipes or 11-choose-your-own-adventure
water bottle

  - replact chain of calls of the api with individual tests
  - reorganise tests so that pour/drink/isEmpty/isFull can be implemented independently (and cause some tests to turn green)

choose your own adventure

  - two run modes: npm test for jest, node for CLI game

See equivalent PR/discussion in solutions repo https://github.com/CodeYourFuture/JavaScript-Core-2-Coursework-Week1-Solution/pull/7
Switch and to or, fixing bug where starting the game with no room would
not trigger the check.
Jestify 4-waterbottle and 11-choose-your-own-adventure
…ness

Fix incorrect logic in CYOA game harness
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants