I have written a form validation using JS which ends with return(true);

```
function check() {
  ....validation code
  return(true);
}

```

All I want is, need to check if check() function returns true, I want to execute another function.

Code I have tried is as follows:

```
if(check() === true) {
  function() {
    //Another function code
  }
}

```