Provide a brief description of the following JavaScript
String methods.
charAt
CharCodeAt
indexOf
replace
split
substr
toUpperCase/toLowerCase
Make a President object that has four properties: name, dates, nickname, and
image.
Paste the data from the txt file in
PresidentData.zip into your program.
Declare a global array of President objects.
When the page loads, parse the president data first on the vertical bar delimiter
then on the comma delimiter.
Use the information to make an array of president objects.
Populate a drop down select having the president's name as the text
and the array index as the value.
When the user selects a president using the drop-down select
the name, dates and nickname of the president should be displayed
as should the corresponding image of the president.
Use (R,G,B) of (0, 102, 204) (#0066CC) for the page's background color to match
the blue in the image. Use white for the font color.
The main design is a table with 4 rows and two columns with all of the cells
in the first column merged. My cells (td elements) have a solid white border.
Take the third letter of the user's first name, the second and fourth
letters of the user's last name, and find the corresponding silly name. Extract these
letters, then use the silly name (see the PoopyStart.txt file below) that has the same
position as the letter does in its array.
You may need JavaScript's charAt(), toUpperCase(), substr(), the array's
indexOf()
Note that the arrays provided are in all small letters. Do not go in "by hand"
and capitalize the first letter of each element in the
first two arrays. Instead loop over the arrays and do that in code.
(If the person's name was not long enough, choose an index at random.)
Concatenate the two silly names derived from the user's last name. Create the full
silly name and display it.
If the user changes the text in the text inputs, clear out your displayed
answer.
Post it on your alpha account and send me the link.