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

ZA2-B Ogundele-JS Core1-Coursework-Wk1 - #336

Open
BereniceOgundele wants to merge 5 commits into
CodeYourFuture:masterfrom
BereniceOgundele:master
Open

ZA2-B Ogundele-JS Core1-Coursework-Wk1#336
BereniceOgundele wants to merge 5 commits into
CodeYourFuture:masterfrom
BereniceOgundele:master

Conversation

@BereniceOgundele

@BereniceOgundele BereniceOgundele commented Aug 3, 2022

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:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?


View rendered exercises/D-strings/README.md

Completed exercises B to F
I attempted X1 mandatory exercise to see if the test passed and it did
I finally got these exercises to run correctly in Node!!!
worked on some mandatory exercises
I worked on the above and am ready to commit these changes

@chandredewet chandredewet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Berenice,

I have indicated some changes to be made to your repo, but most of your code indicates that you do understand fundamentals. Not much to change. Keep on keeping on!

// const message = name.trim();

// console.log(message);
// //was not sure if i should combine the X2 exercises No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not sure either, but great use of .trim(), good method to remember

@@ -1,2 +1,7 @@
var numberOfStudents = 15;
var numberOfMentors = 8;
var numberOfStudents = 15 / 23;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just a tip to keep the original request before you change it. Its not wrong but just helps for troubleshooting. So for e.g. perhaps you could have had:
var numberOfStudents = 15 ;
numberOfStudents = 15/23

Also need to multiply by 100 to get percentage before using Math.round. So perhaps in addition
studentsPercentage = Math.round(numberOfStudents * 100)
console.log( {studentsPercentage}% )

// Complete the function so that it takes input parameters
function multiply() {
function multiply(num1, num2) {
// Calculate the result of the function and return it

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inside the function the calculation needs to occur and answer be returned.
return num1 * num2

return "The total is total";
return "The total is " + total;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great understanding of the fundamentals in this exercise

function multiply(a, b, c) {
a * b * c;
return;
return a + b + c;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is syntactically correct, just instead of pluses it should have been multiplication

console.log(one + two + three);
// Write the body of this function to concatenate three words together.
// Look at the test case below to understand what this function is expected to return.
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this definitely will work, but the requirement asks you to use the concat function used just before.


function getStringLength(word) {
return "word".length();
return word.length();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi. This one is similar to the top in exercises, where u got the trim function right.


function getStringLength(word) {
return "word".length();
return word.length();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

here length is a property not a method, that is it should not have () parenthesis after the word.

@chandredewet chandredewet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if you edit the few mandatory items that are wrong and rerun tests and submit. this repo should work again

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.

2 participants