0

Creating a simple search with Jscript

I want to create a little program whereby I can dynamically add profiles like. Name:John Doe; DOB: 03-04-1995; SAVE And then I search for that profile Like *Search ----------- John Doe *Results -------------- The full profile Name : John Doe DOB : 03-04-1995 I want even if I only search for the DOB I will be able to get the full profile details How can I do that with JavaScript I need your help !! Thank you

16th Mar 2020, 11:21 PM
Muhammad Zain
Muhammad Zain - avatar
3 Réponses
+ 4
One way would be to put the person objects to an array and let your search method return the full object, then output the object by overriding the toString method. https://www.google.com/amp/s/appdividend.com/amp/2019/04/21/javascript-object-tostring-example-object-tostring-method-tutorial/
18th Mar 2020, 9:28 PM
Tashi N
Tashi N - avatar
+ 3
Muhammad Zain please show us what you have done so far.
17th Mar 2020, 12:19 AM
BroFar
BroFar - avatar
0
No JavaScript yet cause am thinking how am going to achieve that but this is the interface https://code.sololearn.com/W6W33Vxj5OXK/?ref=app
17th Mar 2020, 9:08 AM
Muhammad Zain
Muhammad Zain - avatar