Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  15] [ 2]  / answers: 1 / hits: 23267  / 13 Years ago, fri, february 10, 2012, 12:00:00

I'm trying to use this and it doesn't appear to be working. I'm guessing it's just not an option, but want to confirm. Is this valid?



(if_it_is) ? thats_cool();

More From » javascript

 Answers
12

You can use && there:



if_it_is && thats_cool();


It is basically equal to:



if (your_expression){
thats_cool();
}

[#87545] Thursday, February 9, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ninaemiliaj

Total Points: 405
Total Questions: 112
Total Answers: 112

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;