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

London9-Lovelace-Mohamed Abdi-JavaScript-Core-1-Coursework-Week1 - #449

Open
MohamedAbdi114 wants to merge 2 commits into
CodeYourFuture:masterfrom
MohamedAbdi114:master
Open

London9-Lovelace-Mohamed Abdi-JavaScript-Core-1-Coursework-Week1#449
MohamedAbdi114 wants to merge 2 commits into
CodeYourFuture:masterfrom
MohamedAbdi114:master

Conversation

@MohamedAbdi114

Copy link
Copy Markdown

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name: Mohamed Abdi
  • Your City:London
  • Your Slack Name:Mohamed Abdi

Homework Details JS-week1

  • Module:JS-week1
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?
    @JDysiewicz

@JDysiewicz JDysiewicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

all looks great; couple things about using let/const instead of var, however all looks really good - nicely done! :D

Comment thread exercises/D-strings/exercise.js Outdated
// Start by creating a variable `message`

const message = "This is a string."
var messageType = typeof message;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

try to get into the habit of using const instead of var for all variables. Then, if the variable does need to change, you can declare it with let instead. Try to avoid var, as this can cause lots of issues with scoping (https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/, but don't worry about the details for now)

Comment thread exercises/I-floats/exercise.js Outdated
@@ -1,2 +1,6 @@
var numberOfStudents = 15;
var numberOfMentors = 8;
var Total = numberOfStudents + numberOfMentors;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

by convention, variables in JavaScript are lowerCamelCase; variables that start with capital letters usually refer to a class (a data structure that you will learn about soon).

@@ -1,5 +1,7 @@
// Declare your function first
function divide(a,b) {
return a/b

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As a thought, what would happen if b = 0? Your code would try and execute a / 0 - try this and see what happens. This leads onto a nice way of programming called "defensive programming"

Comment thread package.json
"jest-extended": "^0.11.5"
}
},
"main": "index.js",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

something whacky definitely occurred here with your npm; hopefully the discussions we've had will help resolve things

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants