-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions won't pop up??? #1
Comments
Can you also share your index.html code as well? |
<title>Trivia Game</title>
|
Can you also share the question.js code as well? |
Yes my apologies! I’ll send everything right away thank you for the help!
…On Fri, Jul 12, 2019 at 12:03 AM Esterling Accime Youtube < ***@***.***> wrote:
Can you also share the question.js code as well?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AMSH3UARQ6DCYEE66WXSCBTP677CPA5CNFSM4ICAEZK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYTPIY#issuecomment-510736291>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMSH3UFNLGH7B6TTUSUJFK3P677CPANCNFSM4ICAEZKQ>
.
|
var quizQuestions = [
{
question:"What is my name?",
choices: ["Anthony","Ray","Juni","Bob"],
correctAnswer:"Anthony"
},
{
question:"Who is my favorite NFL team?",
choices: ["Bucs","Pats","Fins","Jags"],
correctAnswer:"Pats"
},
{
question:"What City did you live in?",
choices: ["West Palm","Miami","Sarasoda","Cali"],
correctAnswer:"West Palm"
}
]; //this is my question.js
On Fri, Jul 12, 2019 at 6:35 AM Anthony Cotto <anthonycotto75@gmail.com>
wrote:
… Yes my apologies! I’ll send everything right away thank you for the help!
On Fri, Jul 12, 2019 at 12:03 AM Esterling Accime Youtube <
***@***.***> wrote:
> Can you also share the question.js code as well?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1?email_source=notifications&email_token=AMSH3UARQ6DCYEE66WXSCBTP677CPA5CNFSM4ICAEZK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYTPIY#issuecomment-510736291>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AMSH3UFNLGH7B6TTUSUJFK3P677CPANCNFSM4ICAEZKQ>
> .
>
|
// Initial Values // Display questions an Choices in the broswer function loadQuestion() { var question = quizQuestions[currentQuestion].question; $("#game").html(" " + question + "");} loadQuestion(); //app.js |
so i put this in the console to see what it said...... $ ("#game").html (" "+question+"");VM27:1 Uncaught ReferenceError: question is not defined at :1:26 |
Try this I also notice that inside your index.html. You don't have an id named game, instead of you have a class. Instead of
Try
|
I had to put a onclick in the button tag to get the question to show.... but the choices wont show. neither did the timer... I have no clue where im going wrong because i am following you... |
// Initial Values
let counter = 30;
let currentQuestion = 0;
let score = 0;
let lost = 0;
let timer;
// Display questions an Choices in the broswer
function loadQuestion() {
var question = quizQuestions[currentQuestion].question; //
var choices = quizQuestions[currentQuestion].choices; //
$("#game").html("
" + question + "
");}
loadQuestion(); this code does not pop up questions
The text was updated successfully, but these errors were encountered: