File tree Expand file tree Collapse file tree
Projects/Realtime Currency Converter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,10 +8,13 @@ const btn = document.querySelector("#btn");
88const status = document . querySelector ( "#status" ) ;
99
1010// append the curreny codes list to the list and select defaults
11- currency_list . forEach ( ( code ) => {
11+ currency_list . forEach ( ( currency ) => {
12+ const code = currency [ 0 ] ;
13+ const countryName = currency [ 1 ] ;
14+
1215 const newElement = document . createElement ( "option" ) ;
1316 newElement . value = code ;
14- newElement . textContent = code ;
17+ newElement . textContent = ` ${ code } - ${ countryName } ` ;
1518
1619 if ( code === "USD" )
1720 newElement . selected = true ;
Original file line number Diff line number Diff line change 4747.selecterContainer select {
4848 padding : 2px ;
4949 border-radius : 4px ;
50+ max-width : 40% ;
5051 outline : transparent;
5152}
5253# switchCurrency {
You can’t perform that action at this time.
0 commit comments