fullstack-roadmap-series
fullstack-roadmap-series copied to clipboard
Uncaught SyntaxError: redeclaration of let secondNumber
This is a Github issue template. You will need to replace all lines marked with REPLACE. If you want to see an example issue, please refer to this one. While I will try to get to your question as quickly as possible, I am creating this series for free and therefore don't always have a ton of free time. Thanks for your understanding!
What video or post URL is your question regarding?
https://www.youtube.com/watch?v=YFVT567KBlw&list=PLYQSCk-qyTW37zDPzcAyzCsnypFQrhUcq&index=4
If it is a YouTube video, what timestamp are you asking about?
Homework tasks
What is your question?
I can't fix the Syntax error. The console error complains about the secondNumber redeclaration. Please see the code below: const myBoolean = true; const myString = 'hello world'; const firstNumber = 20; let secondNumber = 40; secondNumber = 80; const myArray = [myBoolean, myString];
const myObject = { firstProperty: myArray, sumProperty: firstNumber + secondNumber};
console.log (myObject);
const sumProp = myObject.sumProperty; console.log (sumProp);