I have seen code of the form
functionName(isTrue: ?boolean = true) { //I came know that isTrue is parameter, of boolean type with true as default value
if(isTrue) {
//true Block
}
else {
//false block
}
}
I am new to Javascript, and using react-native from 3 months. So I know that this is a kind of declaration of functions.
I want to know:
- where is the documentation for such types of declarations.
- if this kind of declaration is known by any name?