# Passing from function turning visibility true if != null

**URL:** https://forum.kirupa.com/t/passing-from-function-turning-visibility-true-if-null/259489
**Category:** Uncategorized
**Created:** [May 6, 2008, 1:26am UTC](https://forum.kirupa.com/t/passing-from-function-turning-visibility-true-if-null/259489 "2008-05-06T01:26:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thelittlestuff](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@thelittlestuff](https://forum.kirupa.com/u/thelittlestuff)
#### Post date: [May 6, 2008, 1:26am UTC](https://forum.kirupa.com/t/passing-from-function-turning-visibility-true-if-null/259489/1 "2008-05-06T01:26:35Z")

</div>

What is the best way to write this.

```auto

function myFunction(path, path2, path3, path4) {
     
      if (path != null) {
           f1._visible = true;
  ////then also turning on visibility on f2 for path 2, f3 for path3 ect.... only if they exist.
     like if (path2 != null) { ///was also not null then
           f2._visible = true; ////and so on only if they are present.

   
}

```

I have tried to write this many ways however nothing to avail. Can someone assist on this or point to some reading for crazy ifs
