Our teams are attempting to send a secret message between two teams by writing an encrypted message on their shirts.
Given two pre-made methods (parseAscii, and parseBin) Prompt the user for a single character, convert the character to ascii using
the given parseAscii function, then convert the ascii into an 8-digit binary number using the parseBin function.
Store each of the individual 1’s and 0’s of the binary number into an array using the split method. Finally,
loop through the array and for every element write “true” to the page if 1 and write “false” to the page if 0.
Prompt the user for a single character. Check for valid data.
Use parseAscii() to assign the ascii value of that character to a variable.
Use parseBin() to convert the ascii value to a binary value. Store the result in another variable.
Store each of the individual 1’s and 0’s of the binary value into an array using the split() method.
Make sure there are exactly 8 binary digits.
Loop through the array of binary digits, and output “true” for each 1 and “false” for each 0 to an element on your page.