Hi,
I am using a cryptocurrency API price tracker from: https://www.dunebook.com/create-a-cryptocurrency-price-update-website-using-wix-code/ .
This current code allows me to pull the top 10 cryptocurrency prices from CoinMarketCap:
export function page1_viewportEnter(event, $w) {
getTopCoins().then(response => {
$w('#coinList').text = "Name: " + response[0].name + "t t"
+ "Symbol: " + response[0].symbol + "t t"
+ "Price (USD): " + response[0].price_usd + "n n"
+ "Name: " + response[1].name + "t t"
+ "Symbol: " + response[1].symbol + "t t"
+ "Price (USD): " + response[1].price_usd + "n n"
+ "Name: " + response[2].name + "t t"
+ "Symbol: " + response[2].symbol + "t t"
+ "Price (USD): " + response[2].price_usd + "n n"
+ "Name: " + response[3].name + "t t"
+ "Symbol: " + response[3].symbol + "t t"
+ "Price (USD): " + response[3].price_usd + "n n"
+ "Name: " + response[4].name + "t t"
+ "Symbol: " + response[4].symbol + "t t"
+ "Price (USD): " + response[4].price_usd + "n n"
+ "Name: " + response[5].name + "t t"
+ "Symbol: " + response[5].symbol + "t t"
+ "Price (USD): " + response[5].price_usd + "n n"
+ "Name: " + response[6].name + "t t"
+ "Symbol: " + response[6].symbol + "t t"
+ "Price (USD): " + response[6].price_usd + "n n"
+ "Name: " + response[7].name + "t t"
+ "Symbol: " + response[7].symbol + "t t"
+ "Price (USD): " + response[7].price_usd + "n n"
+ "Name: " + response[8].name + "t t"
+ "Symbol: " + response[8].symbol + "t t"
+ "Price (USD): " + response[8].price_usd + "n n"
+ "Name: " + response[9].name + "t t"
+ "Symbol: " + response[9].symbol + "t t"
+ "Price (USD): " + response[9].price_usd + "n n"
});
}
Apparently, the “n n” is supposed to create the new line, but this is the current output:
This is how it should look:
Does anyone have any idea on how I can separate the lines like shown in the above screenshot?
This is the link to my wix page:
https://twistingknobs8.wixsite.com/mysite
Let me know if I am missing any information and I am willing to jump on a audio/video call for a further deep dive!
Thanks,
Robert