Hey guys i seem to have a little bit of trouble on number 3. and apparently i did all of the above even following the hint but it doesn’t seem to work can someone help me?
let multiplyMe = 32;
multiplyMe *= 11;
console.log(muliplyMe); // Output: 352
These lines are provided for us to test the outputs…
// These console.log() statements below will help you check the values of the variables.
// You do not need to edit these statements.
console.log('The value of levelUp:', levelUp);
console.log('The value of powerLevel:', powerLevel);
console.log('The value of multiplyMe:', multiplyMe);
console.log('The value of quarterMe:', quarterMe);
Is it just me but I can’t see where it lists the initials values for powerLevel, etc?! I can determine it through trial & error and the error messages but seems peculiar
@robgit28 this will help if you’re still stuck, but this is info for all to know.
Initial values of variables levelUp, powerLevel, multiplyMe and quarterMe are not specified within the instructions of this exercise. These initial values should be listed in the following order within the instructions: levelUp having an initial value of 10, powerLevel having an initial value of 9001, multiplyMe having an initial value of 32, and quarterMe having an initial value of 1152.
I understood everything in part 5 of the ’ VARIABLES - Mathematical Assignment Operators’ exercise, but one thing that bugs me is the following part of the code you mentioned. Why is it that when we run the console there is space between ‘The value of quarterMe:’ and the output for quarterMe, even if we don’t have space included after the text inside the string?
console.log() takes a comma separated sequence of mixed types and streams it as character data to the display. Each comma is replaced with a space character.
why does this execruise have the console.log files entered at the bottom for you. was causing syntex errors at part 3 but not 2 or 1 when i tried to console.log my code was right just didn’t need to console log… id prefer it not do any work for me. can someone please explain why 1 and 2 didn’t error but 3 did
levelUp += 5;
console.log(levelup);// no error in syntex
powerLevel -= 100;
console.log(powerLevel);// no error
multiplyMe *= 11;
console.log(multiplyMe); // here is where i got the error
well i dont really know as soon as the console.log(multiplyMe) was removed the error went away.sry not a very good explanation i have three conversations going on nobody will let me learn in this house.
let levelUp = 10;
let powerLevel = 9001;
let multiplyMe = 32;
let quarterMe = 1152;
Are these lines present at the bottom of the code?
// You do not need to edit these statements.
console.log('The value of levelUp:', levelUp);
console.log('The value of powerLevel:', powerLevel);
console.log('The value of multiplyMe:', multiplyMe);
console.log('The value of quarterMe:', quarterMe);
The code we write for steps 1, 2, 3 and 4 should appear on lines 7, 8, 9 and 10.
yes that’s the lesson lol i didn’t read all the compiler messages so i added the console.logs for each one myself.
1 and 2 worked just fine when i did but number 3 through a syntax error. im very new to coding and dont understand how the compiler uses’s the data . so my question was y 1 and 2 didn’t give the error but 3 did.
The code i put into my initial question is exactly how it was entered into the compiler. And thank you for your help