Code:
Palindrome:
%dw 2.0
output application/json
var a = 4
---
if((a as String == (a as String)[-1 to 0])) "palindromeNumber " else "notPalindromeNumber"
NotPalindrome:
%dw 2.0
output application/json
var a = 56
---
if((a as String == (a as String)[-1 to 0])) "palindromeNumber " else "notPalindromeNumber"
No comments:
Post a Comment