-2
Could help me solve this question, it should return false/true!
We need to create a function that checks if two people are half brothers!
In order for you to solve this exercise, we have defined for you the functions maeDe and paiDe, which, by receiving a child (string), returns the name (string) of the mother or father as appropriate. Example:
paiDe(cleoPires) "Fábio Júnior" maeDe(cleoPires) "Glória Pires" Now it is your turn to create the functions: temAMesmaMae who has two children by parameter and will return true oufalse if they actually share the same mother. Knowing this you can use the function we give you maeDe.
temOMesmoPa that like the previous one, takes two children by parameter and returns true oufalse if they share the same father. Knowing this you can use the function we give you paiDe.
And We Plan, that by receiving two children per parameter, tell us if they are in fact half-siblings. You should use the two previous functions here.
function temAMesmaMae(sandy,junior){
var maeDe(sandy) = "Noely";
var maeDe(junior) = "Noely";
return maeDe (sandy) == maeDe ("junior");
}
function temOMesmoPai(cleoPires,fiuk){
var paiDe(cleoPires) = "Fábio Junior";
var paiDe(fiuk) = "Fábio Junior";
return paiDe (cleoPires) == paiDe ("fiuk");
}
function saoMeioIrmaos (cleoPires, fiuk){
var paiDe(cleoPires) = "Fábio Junior";
var maeDe(cleoPires) = "Glória Pires";
return maeDe(cleoPires) != maeDe "fiuk";
}