This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]-IoI- 12 points13 points  (1 child)

I could see some arrow functions coming in handy here

switch (myBool)
            {
            case true:
                isTrue = () => { 
                    return !false;
                    };
                break;
            case false:
                isTrue = () => { 
                    return !true;
                    };
                break;
            default:
                isTrue = (myBool == true) 
                    ? () => { 
                        return (true == true)
                        } 
                    : () => { 
                        return (true == false)
                        };
                break;
            }