Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
A **Fibonacci** Word is a specific sequence of binary digits (or symbols from any two-letter alphabet). The Fibonacci Word is formed by repeated concatenation in the same way that the Fibonacci numbers are formed by repeated addition.
Create a **function** that takes a number **n** as an argument and returns the first **n** elements of the Fibonacci Word sequence.
If **n < 2**, the function must return "**invalid**".
**Examples**
FiboWord(1) ➞ "invalid"
FiboWord(3) ➞ "b, a, ab"
FiboWord(7) ➞ "b, a, ab, aba, abaab, abaababa, abaababaabaab"
**Notes**
You can try solving this using a recursive approach.
**Resources**
[Fibonacci Number](https://en.wikipedia.org/wiki/Fibonacci_sequence)
[Fibonacci word](https://en.wikipedia.org/wiki/Fibonacci_word)
CONTRIBUTE TO THIS THREAD