Continuing the discussion from JAVASCRIPT SYNTAX, PART III Message Mixer :
This seems to be in the same file. Here you declared caesarCipher for the first time: const {caesarCipher, symbolCipher, reverseCipher}
, and here is the second declaration: const caesarCipher = Cipher.caesarCipher;
which causes the error.
Welcome to the Get Help category!
This is where you can ask questions about your code. Some important things to remember when posting in this category
Learn how to ask a good question and get a good answer!
Remember to include a link to the exercise you need help with!
If someone answers your question, please mark their response as a solution
Once you understand a new concept, come back and try to help someone else!
Could you specify how the rather general question from your title is related to the topic you linked?
The question ‘How to destructure an object?’ is answered quickly and independently from the linked topic:
basic object destructuring
const obj = {
str: 'a string'
}
const {str} = obj;
console.log(str); // logs: 'a string'
nested object destructuring
const obj = {
nestedObj: {
str: 'a string'
}
}
const {nestedObj: {str}} = obj;
console.log(str); // logs: 'a string'
Does this already answer your question?
system
Closed
June 7, 2023, 7:06am
4
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.