ASCII art allows you to represent forms by using characters. To be precise, in our case, these forms are words. For example, the word "MANHATTAN" could be displayed as follows in ASCII art:
# # # ### # # # ### ### # ###
### # # # # # # # # # # # # # #
### ### # # ### ### # # ### # #
# # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # #
Your mission is to edit AsciiArt.js file and write a program that can display a line of text in ASCII art in a style you are given as input.
- width: the width of a letter represented in ASCII art. All letters are the same width.
- height: the height of a letter represented in ASCII art. All letters are the same height.
- text: The line of text, composed of N ASCII characters.
- alphabet: the string of characters ABCDEFGHIJKLMNOPQRSTUVWXYZ? Represented in ASCII art.
- The text in ASCII art.
- The characters a to z are shown in ASCII art by their equivalent in upper case.
- The characters that are not in the intervals [a-z] or [A-Z] will be shown as a question mark ? in ASCII art.
0 < L < 30
0 < H < 30
0 < N < 200
4, 5, E,
[" # ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ### ",
# # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # # ",
### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # ## ",
# # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # # ",
# # ## ## ## ### # ## # # ### # # # ### # # # # # # # # # ## # ### # # # # # # ### # "]
###
#
##
#
###
4, 5, MANHATTAN,
# ## ## ## ### ### ## # # ### ## # # # # # ### # ## # ## ## ### # # # # # # # # # # ### ###
# # # # # # # # # # # # # # # # # ### # # # # # # # # # # # # # # # # # # # # # # # #
### ## # # # ## ## # # ### # # ## # ### # # # # ## # # ## # # # # # # ### # # # ##
# # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # # # # # # ### # # # #
# # ## ## ## ### # ## # # ### # # # ### # # # # # # # # # ## # ### # # # # # # ### #
# # # ### # # # ### ### # ###
### # # # # # # # # # # # # # #
### ### # # ### ### # # ### # #
# # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # #
The tests are failing right now because we're not returning the correct string. Fixing this up will make the tests green.
yarn install
yarn test
Your grade will be calculated based on more test cases that are not included in the repo.