Click here to Skip to main content
15,860,859 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionhow do you paint objects with two different colors in the for repetition structure Pin
Member 1541326530-Oct-21 3:38
Member 1541326530-Oct-21 3:38 
AnswerRe: how do you paint objects with two different colors in the for repetition structure Pin
Richard MacCutchan30-Oct-21 4:25
mveRichard MacCutchan30-Oct-21 4:25 
GeneralRe: how do you paint objects with two different colors in the for repetition structure Pin
Member 1541326530-Oct-21 9:07
Member 1541326530-Oct-21 9:07 
AnswerRe: sytax error unexcepted token Pin
OriginalGriff5-Oct-21 21:20
mveOriginalGriff5-Oct-21 21:20 
GeneralRe: sytax error unexcepted token Pin
Richard Deeming5-Oct-21 21:44
mveRichard Deeming5-Oct-21 21:44 
GeneralRe: sytax error unexcepted token Pin
OriginalGriff5-Oct-21 21:52
mveOriginalGriff5-Oct-21 21:52 
Questiondata import via API Pin
Francesco Reboldi23-Sep-21 19:28
Francesco Reboldi23-Sep-21 19:28 
AnswerRe: data import via API Pin
Afzaal Ahmad Zeeshan23-Sep-21 23:47
professionalAfzaal Ahmad Zeeshan23-Sep-21 23:47 
First and foremost, never share the credentials on public websites. Your bearer token can be used by bots to cost you money; try to avoid that.

Secondly, I see that you have defined a function onInterval but you never call that function. You can either call that as a response to some event (button click, input, page load complete, etc.) or you can create a self-calling function.
JavaScript
(function onInterval() {
   // code here
})();
You can see that I just wrapped the function and then called it in-place.

Lastly, you created a candleData object but you never rendered it anywhere. Maybe you can put it inside the h3 or p.u-text-palette-3-base using your container variable.
JavaScript
// after the const candleData map function finishes, do this
container.innerText = JSON.stringify(candleData);
You should be able to see something. I have skipped the complete code because I want you to give it a try. Smile | :)

Learn more here:
JSON.stringify() - JavaScript | MDN
closures - What is the purpose of a self executing function in javascript? - Stack Overflow
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: data import via API Pin
Afzaal Ahmad Zeeshan24-Sep-21 4:11
professionalAfzaal Ahmad Zeeshan24-Sep-21 4:11 
GeneralRe: data import via API Pin
Francesco Reboldi24-Sep-21 5:13
Francesco Reboldi24-Sep-21 5:13 
GeneralRe: data import via API Pin
Francesco Reboldi25-Sep-21 6:26
Francesco Reboldi25-Sep-21 6:26 
QuestionRegex not keeping the . or decimal with currency value with keydown event. Pin
jkirkerx23-Sep-21 9:06
professionaljkirkerx23-Sep-21 9:06 
AnswerRe: Regex not keeping the . or decimal with currency value with keydown event. Pin
Member 1532961323-Sep-21 9:32
Member 1532961323-Sep-21 9:32 
GeneralRe: Regex not keeping the . or decimal with currency value with keydown event. Pin
jkirkerx23-Sep-21 9:39
professionaljkirkerx23-Sep-21 9:39 
GeneralRe: Regex not keeping the . or decimal with currency value with keydown event. Pin
Member 1532961324-Sep-21 1:07
Member 1532961324-Sep-21 1:07 
AnswerRe: Regex not keeping the . or decimal with currency value with keydown event. Pin
jkirkerx29-Sep-21 12:19
professionaljkirkerx29-Sep-21 12:19 
GeneralRe: Regex not keeping the . or decimal with currency value with keydown event. [Perhaps Solved] Pin
jkirkerx29-Sep-21 13:18
professionaljkirkerx29-Sep-21 13:18 
QuestionHow does the compare function work with numerical sort? Pin
Ryan Blake 202126-Aug-21 15:51
Ryan Blake 202126-Aug-21 15:51 
AnswerRe: How does the compare function work with numerical sort? Pin
Peter_in_278026-Aug-21 18:22
professionalPeter_in_278026-Aug-21 18:22 
GeneralRe: How does the compare function work with numerical sort? Pin
Ryan Blake 202128-Aug-21 13:45
Ryan Blake 202128-Aug-21 13:45 
QuestionBrowser Side Recovery Pin
milo-xml3-Aug-21 9:06
professionalmilo-xml3-Aug-21 9:06 
AnswerRe: Browser Side Recovery Pin
Richard Deeming3-Aug-21 23:48
mveRichard Deeming3-Aug-21 23:48 
GeneralRe: Browser Side Recovery Pin
milo-xml4-Aug-21 3:20
professionalmilo-xml4-Aug-21 3:20 
Questioni have been learning javascript for a long time now but still dont know what to build Pin
samuel unachukwu23-Jul-21 22:47
samuel unachukwu23-Jul-21 22:47 
AnswerRe: i have been learning javascript for a long time now but still dont know what to build Pin
SeeSharp226-Jul-21 8:51
SeeSharp226-Jul-21 8:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.