Need help with qoute generator reference error issue

on click button function is not working ounce I load my web page. It keeps saying I have a reference error at line 15 and I cant figure out why.

index.html file

Message Generator

Message Generator

/* Qoutes will display here */
New Qoute

script.js file
var qoutes = [
‘Life is like a box of chocolates, you never know what your gonna get. - Forrest Gump’,
‘Poop or get off the pot. - Grandpa’,
‘Only God can judge me. - Tupac’,
‘One small step for man, one giant leap for mankind. - Neil Armstrong’,
‘They are who we thought they were -Dennis Green’

function newQoute() {
var randomNumber = Math.floor(Math.random() * (qoutes.length));
document.getElementById(‘messageGenerator’).innerHTML = qoutes[randomNumber];

Shouldn’t need to point out the issue.

How do you mean? Did I have a typo?

Appears so. Take another look at it.

1 Like

I did indeed have a typo. Thanks so much for your help

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.