Last active
November 23, 2018 14:29
-
-
Save souhe/dd6e130e767058dfa3afce9530031b94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Autogenerated code by bucklescript after few improvements | |
function func(userWithReview) { | |
let { name, phone, review, age } = userWithReview; | |
if (name === 'Maja') { | |
if (phone === '123123') { | |
if (typeof match === 'number') { | |
if (review !== 0) { | |
return ( | |
'Here we match every value with name Maja and we can use phone like a normal variable - ' + | |
phone | |
); | |
} else if (age !== 24) { | |
return ( | |
'Here we match every value with name Maja and we can use phone like a normal variable - ' + | |
phone | |
); | |
} else { | |
return 'Here we match every value with name Maja, phone 123123 and a Neutral review'; | |
} | |
} else { | |
return ( | |
'Here we match every value with name Maja and we can use phone like a normal variable - ' + | |
phone | |
); | |
} | |
} else { | |
return ( | |
'Here we match every value with name Maja and we can use phone like a normal variable - ' + | |
phone | |
); | |
} | |
} else { | |
if (typeof review === 'number') { | |
if (review !== 0) { | |
return 'Here we match every user with review Awesome and we can use phone and name'; | |
} else { | |
return 'Here we match everything else'; | |
} | |
} else { | |
return ( | |
'Here we match every user with review Baw and we can use phone, name, and the explanation' + | |
review[0] | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment