Jump to content
pstein

Is there a similar function like ((a < b) ? "lower" : "greater")?

Recommended Posts

In many other programming languages (e.g. Java) there is a function like:

((a < b ) ? "lower" : "greater")?

which outputs "lower" if the value of variable a is lower than the value of variable b. Otherwise "greater"

Is there a similar function in Javascript?

Peter

Edited by pstein

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×