SyntaxFix
Write A Post
Hire A Developer
Questions
Use the ternary operator
direction == 1 ? dosomething () : dosomethingelse ();