Question
Using Dataweave write a function that will take a list of integers as its only argument. it should return the same list of integers but
Using Dataweave
write a function that will take a list of integers as its only argument. it should return the same list of integers but be coded to: 1. if the integer is divisible by 3, return the string "Fizz" in its place 2. if the integer is divisible by 5, return the string "Buzz" in its place 3. if the integers are divisible by both 3 and 5, return the string "FizzBuzz" in its place.
4. Do not use conventional if-else blocks and use the case function instead. However, if and else can be used exclusively.
input sample: [1,2,3,4,5,6,7,8,9,10] output sample: [1,2,"Fizz",4,"Buzz","Fizz",7,8,"Fizz","Buzz"]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started