Tell us what’s happening:
Hello. There is something wrong with my code because it doesn’t pass. I want to realise what is a failure but unfortunately I can’t. Please help me.
export const locations = [
{
name: 'town square',
'button text': ['Go to forest', 'Go to beach'],
'button functions': [goForest, goBeach],
text: 'You are in the town square. You see a path to the forest and another to the beach.'
},
{
name: 'easter egg',
'button text': ['2', '8', 'Go to town square?'],
'button functions': [pickTwo, pickEight, goTown],
text: 'You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!'
}
];
import { locations } from './main.js';
console.log(locations);
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
export const locations = [
{
name: 'town square',
'button text': ['Go to forest', 'Go to beach'],
'button functions': [goForest, goBeach],
text: 'You are in the town square. You see a path to the forest and another to the beach.'
},
{
name: 'easter egg',
'button text': ['2', '8', 'Go to town square?'],
'button functions': [pickTwo, pickEight, goTown],
text: 'You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!'
}
];
import { locations } from './main.js';
console.log(locations);
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 161