Hi everyone
I am learning to code and to practice my 30% of skills in javascript, HTML, and CSS, I made a project but it is not working properly. I tried to get help from StackOverflow but have not been able to `find the problem yet.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="story.css">
</head>
<body>
<img src="kisspng-storytelling-narrative-image-book-portable-network-storyteller-clipart-magic-5cd4d453eedf91.6679978915574518599784.png" alt="image"width="500" height="500">
<h1>Story World</h1>
<p>
Welcome to Story World.<br>
Happy Reading 🌞 </p>
<br><button id ='story'> Lets Find it </button>
<br>
<p id ='full-story'></p>
<script src = 'story.js'></script>
</body>
</html>
Javascript
let stories = ['Once there was a little girl who loves to dance ',
'It is story of a fan and acc.','This story is about bird ',
'This story is about two friends named Joe and Jenny'
]
let button = document.getElementById('story');
let fullStory = document.getElementById('full-story')
function ready(){
let randomStory = Math.floor(Math.random()*stories.length);
return ready[randomStory]
}
function showStory (){
fullStory.innerHTML = ready();
button.innerHtml = "Next story"
}
button.addEventListener = ('click', showStory)