0

Can Anyone expain please why did we write ": [ ] " in line 10

Can Anyone explain please why did we write ": [ ] " in line 10. I believe it is the simplest way to write but what exactly is this, can anyone give another example of this to understand please?

1 Answer 1

0

you need to look at lines 9 and 10 together. It's just a ?: conditional operator.

If there are errors - use helper function (it probably flattens various error messages, page level, field level, duplicate rules etc) to get 1 simple error message.

Else return an empty array.

Sign up to request clarification or add additional context in comments.

1 Comment

Great I understood now. Thanks @eyescream

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.