Learn how to randomly pull data from an array as I show you how I build an idea generator app from start to finish using JavaScript, HTML, and CSS. In this part of the tutorial, we focus on the problem of pulling two random bookmarks to create our idea generator. We'll cover how to generate a random number in JavaScript, how you can use this random number to get a random item from the bookmarks list, and more debugging strategies for when your data is null.
This is part 5 of an 8 part tutorial. Check out the playlist here: • Idea Generator Tutorial
Follow along by cloning or forking the main branch here: https://github.com/ProfessorKolodziej...
Chapters in this video:
[00:00] Introduction
[00:25] Review of the last video
[00:39] How to generate a random number in JavaScript
[01:44] Restart build tools
[03:12] Review the codebase and define the problem
[04:26] Write a function to generate a random number
[06:25] Debugging the compiling error by running npm run fix
[07:49] Debugging the "stored data is null" error
[09:41] Adjust the function to create two random numbers
[10:48] Debugging the errors with the function
[11:47] Test the randomizing function pulls two random bookmarks
[12:16] Conclusion
Image/Thumbnail Credits ❤️Photo by Alessandro Bianchi on Unsplash https://unsplash.com/@ale_s_bianchi?u...
On this page of the site you can watch the video online Idea Generator Tutorial Part 5: Write a function to get two random bookmarks with a duration of hours minute second in good quality, which was uploaded by the user Professor K Explains 22 June 2021, share the link with friends and acquaintances, this video has already been watched 77 times on youtube and it was liked by 3 viewers. Enjoy your viewing!