"use strict";

// variables listeMots et listePersonnes pour la question 1

let listeMots = ["long","truthful","overjoyed","protest","legal","needle","tongue","excellent","rob","neat","activity","tacit","ill-informed","maniacal","uncovered","wheel","cart","thumb","wide","actually","itchy","value","turn","bustling","influence","ill","enjoy","conscious","knee","night","knowledge","school","window","appreciate","lewd","ceaseless","panicky","volcano","oatmeal","arrest","thunder","green","seat","base","groan","scarecrow","flowery","zip","detect","repulsive","belligerent","habitual","paddle","challenge","hospital","white","tray","craven","ritzy","rabid","carry","eager","adhesive","dangerous","temporary","silky","meek","sense","zoo","grubby","brass","brown","precious","aback","parched","satisfying","dusty","goofy","teeny","tour","partner","grey","scorch","pet","grab","brake","yarn","store","respect","black-and-white","pump","incredible","aberrant","giants","languid","jagged","cuddly","business","wound","beautiful"];

let cherche1 = "sf";
let cherche2 = "ge";


/**
 * Question 1
 *
 * Compléter ci-dessous la fonction contientChaine qui :
 * - prend en argument une liste de mots et une chaine
 * - retourne la liste des mots qui contiennent la chaine
 *
 * ATTENTION INTERDICTION d'utiliser filter()
 *
 * IMPORTANT la recherche doit être insensible à la casse (utiliser toLowerCase())
 *
 * Afficher en console le résultat pour listeMots et cherche1 puis pour listeMots et cherche2
 *
 */

function contientChaine(/* à compléter */) {

}




// variables listePersonnes, personne1 et personne2 pour la question 2
let listePersonnes = [
    {"id":"11a72f65-fece-48e9-828c-e25540564399","prenom":"Parsons","nom":"Best"},{"id":"a7a9d616-6efb-4eaa-9c9c-8a3b723fd206","prenom":"Roberta","nom":"Tanner"},{"id":"0f74d025-326a-4f59-88da-453a8fc53ab9","prenom":"Brad","nom":"Dobradigan"},{"id":"6ae82b84-f7dc-4f86-9e7c-c17e0dcfb0a9","prenom":"Perry","nom":"Wilkerson"},{"id":"f532f305-ace7-4b95-aca3-3bed54f32402","prenom":"Bonner","nom":"Weeks"},{"id":"3aec925a-d7fd-42d9-a85b-562307785c7e","prenom":"Pearl","nom":"Contreras"},{"id":"8ac3673c-bb3a-4ded-a7fd-09376252d6f2","prenom":"Hensley","nom":"Spencer"},{"id":"a82c629e-3fc5-4fb8-8074-3a7e3f9c262f","prenom":"Rob","nom":"Drobart"},{"id":"b359fe32-264b-4f42-98b4-83e63dfa3fbf","prenom":"Fry","nom":"Pennington"},{"id":"1966322c-f402-4bb8-9eee-26b9f17f8d72","prenom":"Branch","nom":"Frank"},{"id":"5b282546-7de3-4106-9939-afb580059a4c","prenom":"Thelma","nom":"Rogers"},{"id":"b5a4a53f-298d-4955-90ce-01215f545d8a","prenom":"Caldwell","nom":"Hardy"},{"id":"dcb6c2b2-b847-4f16-9dd9-8350e529f408","prenom":"Dawson","nom":"Ramirez"},{"id":"daae283b-a478-4c6f-add3-e59af989a35f","prenom":"Robert","nom":"Bradford"},{"id":"6e6e2e37-af2c-414c-a324-999fe6671a7c","prenom":"Oconnor","nom":"Nelson"},{"id":"98310119-2c52-4e47-a7d5-355925b4e907","prenom":"Morin","nom":"Ayala"},{"id":"05e9a869-49bb-4de8-b378-b14edc1bfa57","prenom":"Deanne","nom":"Ballard"},{"id":"acbc18a6-0e3e-4620-bb30-a6fc5ef64396","prenom":"Lopez","nom":"Hamilton"},{"id":"aa07c253-eeec-4e83-ac2a-38a9b3292793","prenom":"Dina","nom":"Morrison"},{"id":"4b00e756-569a-4af2-9a9c-2614eeefa3a5","prenom":"Lenore","nom":"Hampton"},{"id":"d0ba96f1-64a0-4df6-86a6-8d32e9e81ec2","prenom":"Cochran","nom":"Fox"},{"id":"70216d9a-0232-4709-ad86-ba76b9448b76","prenom":"Brad","nom":"Hernandez"},{"id":"570c7f95-c9cc-4bb1-bb23-851fd26b16c0","prenom":"Castillo","nom":"Knox"},{"id":"aebac2ec-1f7b-4441-8078-c9a484f28d45","prenom":"Mayra","nom":"Miles"},{"id":"2f1a9761-62f0-4e74-a030-ef75cb956162","prenom":"Mendoza","nom":"Brewer"},{"id":"19a4872e-8f07-428f-aad7-d9b84098b187","prenom":"Debora","nom":"Diaz"},{"id":"629ec9cd-81d9-45ec-ad5a-d60c0c572e3d","prenom":"Charity","nom":"Holloway"},{"id":"f0d5ec27-30c1-4eca-961c-c39c30055abd","prenom":"Laurel","nom":"Rocha"},{"id":"a9ccef42-885f-407a-9ec5-b3dc78b57631","prenom":"Knight","nom":"Reid"},{"id":"a3cfd694-4bd9-4c8c-939c-0243896e6dd0","prenom":"Michele","nom":"Sheppard"},{"id":"ec5d9431-1277-4d2b-95c3-d755413c8174","prenom":"Susan","nom":"Rivera"},{"id":"6920a8a8-a017-4ceb-a468-d4c4280937d9","prenom":"Justice","nom":"Bradford"},{"id":"9c6e20d7-4f9f-487f-a5f8-cff0938831db","prenom":"Massey","nom":"William"},{"id":"54deb728-7ef4-41e7-b640-3ac75d1a6aba","prenom":"Alissa","nom":"Morgan"},{"id":"10fe846b-8912-4540-8fa4-1adf903101a1","prenom":"Abigail","nom":"Stone"},{"id":"ff7f59d2-b775-4789-b11d-f3522c454533","prenom":"Ortega","nom":"Clark"},{"id":"6b287594-6bf2-4792-933f-e550e4a34056","prenom":"Brad","nom":"Barron"},{"id":"10fcef98-f5df-4807-8e3a-ed186ba1031e","prenom":"Shelby","nom":"Maynard"},{"id":"dc0d3ab7-c4bc-43de-acff-cd0812ef9fff","prenom":"Holloway","nom":"Jenkins"},{"id":"197d04c0-cbc4-4943-b882-8739ae406cc8","prenom":"Rich","nom":"Tyler"},{"id":"90066e35-1f00-4ef3-9e04-1ecca2efda17","prenom":"Aurora","nom":"Lamb"},{"id":"4d169d62-23ba-46e4-b792-342abc5ec5b4","prenom":"Callie","nom":"Trujillo"},{"id":"9a2848c8-de2f-49ec-b33e-718a49b73224","prenom":"Mae","nom":"Freeman"},{"id":"2664af20-6989-4146-9ff8-9a94934552df","prenom":"Josefa","nom":"Ray"},{"id":"fcd57c73-5d0e-462c-958e-592f8e752b53","prenom":"Marquez","nom":"Bailey"},{"id":"e3e8bb1d-d773-4745-b79e-dc87c5ea3f2b","prenom":"Justine","nom":"Sargent"},{"id":"1c1d95e1-92dd-4bc4-b1f8-4667981cc72f","prenom":"Mandy","nom":"Olson"},{"id":"c81b3d40-0c4d-4d31-b8a6-dfcc06d3f8b1","prenom":"Corine","nom":"Key"},{"id":"354fc052-a8e9-4189-a99f-a75d3f337163","prenom":"Montoya","nom":"Travis"},{"id":"dcdb1efe-0743-49db-a3f6-dd8c1212dd28","prenom":"Wallace","nom":"Mccray"}
]

let personne1 = "Bra";
let personne2 = "Rob";

/**
 * Question 2
 *
 * Compléter ci-dessous la fonction cherchePersonne qui :
 * - prend en argument une liste et une chaine
 * - retourne la liste des IDENTIFIANTS des personnes dont le nom OU le prénom
 *   contient la chaine cherchée
 *
 * IMPORTANT la recherche doit être insensible à la casse (utiliser toLowerCase())
 *
 * Afficher en console le résultat pour listePersonnes et personne1 puis pour listePersonnes et personne2
 */

function cherchePersonne(/* à compléter */) {

}
