Increment variable in jslt #314
abhishekrongali
started this conversation in
General
Replies: 1 comment
-
In short, no. JSLT doesn't let you modify "variables". What you can do is build an array that contains only the objects that satisfy the condition, then count the length of it. Or you can use a recursive function for the computation. You have to think in a functional style with JSLT. It's not an imperative language like Java. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Is there a way to increment a variable defined in jslt?
Like I declared a variable in jslt like -> let count = 0
I want to increment it in next lines of codes when specific condition satisfies it, can you please help me with sample examples?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions