Skip to content
Sign UpLog In
Profile icon

Go'zal Sabirova

@gozalsabirova
Repls
Community
gozalsabirova
gozalsabirova
shared a Post
2 years ago
How do I return the variable that stores the return value of break bark??
Instructions from teacher: On your last line of code, make sure you return the variable that stores the return value of breakBark().
Function Flow: Candy
Node.js
DollarSign
DollarSign
console.log(pieces);2 years ago
gozalsabirova
gozalsabirova
shared a Post
2 years ago
I only need help with the last part.. What am I doing wrong? Instructions from the teacher: Define a function named breakBark. It should have one pa
Deconstruction: Candy Treats
Node.js
SixBeeps
SixBeeps
The instructions don't tell you to add an array property to the object, but instead it tells you to return something given a condition. It looks like you're trying to return the boughtChocolate object, but the instructions tell you to return the array with the Mint Chocolate Bark Pieces (i.e. newArray).2 years ago
gozalsabirova
gozalsabirova
shared a Post
2 years ago
These are the instructions from my teacher: Now it is your turn to invoke all three grading functions, and then use console.log() to output the final
tipearso
tipearso
I wish someone would answer because I'm stuck too. did you figure it out?2 years ago
gozalsabirova
gozalsabirova
shared a Post
2 years ago
I need to add these properties to "student" math: B science: A history: C How can I do this within these functions?? What am I doing wrong?
Function Flow: Adding Properties
Node.js
SixBeeps
SixBeeps
Your functions modify the student variable, meaning that it would be pointless to return anything. Instead, I think you're looking for this: const addGrade = (gradedStudent) => { gradedStudent.grade = 'A' return gradedStudent } `2 years ago
gozalsabirova
gozalsabirova
shared a Post
2 years ago
I keep getting this error when I try to submit: "shouldreturnawoodblock_object Expected Object({ type: 'wood block', length: 10, material: undefined,
Function Flow: Introduction
Node.js
gozalsabirova
gozalsabirova
Also, the instructions from my teacher are: Due: -- submit Instructions from your teacher: The Flow of Using Functions The flow of using functions, sending data to them, capturing the data they return, and then sending that data somewhere else will be a challenge for you. Therefore, in this exercise, you are going to practice that flow. Here's an example of two tasks. One task depends on what the other outputs, or returns. Reminder: If a function returns a value, you must store that value in2 years ago
gozalsabirova
gozalsabirova
shared a Post
3 years ago
Having trouble again.. My const = 48. but when I run it I get this result: This is what I'm wearing today: T-shirt on my torso Shorts on my legs Sne
Part 6: More or Less Party
Node.js
gozalsabirova
gozalsabirova
Wait... problem solved! I took quotes off the last if statement and the right answer came up.. Thanks for your help everyone3 years ago
gozalsabirova
gozalsabirova
Now i'm getting this: This is what I'm wearing today: Jacket on my torso Pants on my legs Boots on my feet https://repl.it/student/submissions/122152583 years ago
Highwayman
Highwayman
1) On lines 13, 19, and 25 you quoted the the conditions making them always evaluate to true which is messing up you program. Unquote them and it should work.3 years ago
gozalsabirova
gozalsabirova
shared a Post
3 years ago
I keep getting an error message when I try to run this. I've toyed around with the code, but can't seem to figure out the problem. Any ideas what's wr
AphixDev
AphixDev
Okay. I believe you need a semicolon after many lines.3 years ago
PYer
PYer
Hello @gozalsabirova! Next time you ask a question, it would be more helpful to link the repl rather than share screenshots, but to answer your question: The problem is that you have no value in between the braces. Therefore, the waits for a variable to be passed, and then unexpectedly stumbles across the ending brace (}). Therefore, it raises an error pointing it out. To fix it, you should include the variables you want to print inbetween the braces, as shown below: console.log(`This is what I'3 years ago