+ 1

Simple database in JS

Hey guys! I got this idea of making a simple database. It would contain objects and their colors. Perferably with prompt input. My idea is to be able to list all the black objects for an example. Or what colors a ball have. Is this possible?

2nd May 2020, 3:12 AM
Peter Svärd
Peter Svärd - avatar
4 Réponses
+ 5
Database query can find what you want, as long as the database is setup with the correct fields. What's database you going to use?
2nd May 2020, 3:17 AM
Calviղ
Calviղ - avatar
+ 4
The frontend way : https://code.sololearn.com/WhE1Ix3IKm4D/?ref=app My video explanation for the above code : https://youtu.be/1tJaXiw1LJ4 Then, connect to a RESTful API or Firebase to store the JSON.
2nd May 2020, 6:07 AM
Gordon
Gordon - avatar
+ 3
Peter Svärd 😉 Let me know if you have any questions. This is the JavaScript client-side way, the input are stored at an array, which will be reset at reload. After understanding the frontend way, if you need to store the data, we'll create part 2 - How to connect to database.
3rd May 2020, 4:26 AM
Gordon
Gordon - avatar
0
Jebus.. Gordon u wrote that just like that? Dude, thanks alot! I will check your vid for sure! I really want to understand this! Thanks again :)
2nd May 2020, 4:21 PM
Peter Svärd
Peter Svärd - avatar