Whats wrong with this expression

So this expression works in the webpage, but it throws an error in the browser console.

Error is: "Error: Unexpected token, expecting [R_PAREN] in expression"

Expression is:

((get_comment.private && (get_comment.role_id != 3)) || (get_comment.private && (get_comment.role_id == 4))

I want it to say:

if get_comment.private (true)
And
Role id != 3
OR
get.comment.private (true)
And
Role id == 4

Any suggestions why it works in app but throws an error in console as above?

What is the correct way of writing this?

Thanks!

Cleaned up the brackets a bit, in the first part of the expression you have 3 opening brackets and only 2 closing brackets. For the whole expressions you where missing 1 closing bracket.

(get_comment.private && get_comment.role_id != 3) || (get_comment.private && get_comment.role_id == 4)
1 Like

Cheers!