Click here to Skip to main content
15,879,239 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Disappearing linked drop-down menus Pin
Richard MacCutchan24-Apr-22 21:39
mveRichard MacCutchan24-Apr-22 21:39 
GeneralRe: Disappearing linked drop-down menus Pin
gosipp24-Apr-22 21:42
gosipp24-Apr-22 21:42 
QuestionReloading a wav file after ended Pin
Burketa219-Apr-22 7:24
Burketa219-Apr-22 7:24 
AnswerRe: Reloading a wav file after ended Pin
Richard Deeming19-Apr-22 21:30
mveRichard Deeming19-Apr-22 21:30 
QuestionHow to convert tagged text into html formatted text? Pin
Alex Dunlop18-Apr-22 19:25
Alex Dunlop18-Apr-22 19:25 
QuestionLoops, someone to help me Pin
FranciscaNunes200412-Apr-22 10:30
FranciscaNunes200412-Apr-22 10:30 
AnswerRe: Loops, someone to help me Pin
Richard MacCutchan12-Apr-22 21:16
mveRichard MacCutchan12-Apr-22 21:16 
AnswerRe: Loops, someone to help me Pin
Member 1562749529-May-22 21:29
Member 1562749529-May-22 21:29 
loops are made to process inner instructions several times, or once ( or zero ).

there are : while | for | foreach

____________________________________________
an infinite loop could be achieved by :
while(true){ instruction... ;;;;;; } // for specific use.

each loop have a (test condition) to break it.
while(condition){...; }
while(i < 24){...; }
while(output !== 'quit'){ .... ; }

it's booleans 'true' or 'false' return;

______________________________________________
the 'for' loop is a very powerful loop
as basic you have learn :

for(var init ; test_condition ; before next lap instruction ) { .....;;;; }

like :

for(i=0 ; i< 24 ; i++) { ...;;;; }

but at full use, you can provide lot of parameters in :

for(i=0,j=5,trace=true ; i < sucess() ; trigger() , run_gui() , add_components() , i++ , j-- , toggle_trace() ){ .....;;;;;;;;;;; }

it's to show you another complex methods with for..loop. very powerfull and short written

_________________________________________________
for each loop :

It's about achieve 'fetch' in a container without incrementation of vars.

foreach(row in big_container){ console.log(row) }

this way , the big container is read, and the row is display in console log.
each row in big container will be display in console log.
it's useful when high limit is unknown , it's modern syntax.
at end of big_container the loop break out.

loops are call 'iterators/iteration' statements too.
QuestionReact date formatting Pin
Simon_Whale7-Apr-22 3:25
Simon_Whale7-Apr-22 3:25 
AnswerRe: React date formatting Pin
Peter_in_27807-Apr-22 3:34
professionalPeter_in_27807-Apr-22 3:34 
AnswerRe: React date formatting Pin
Richard Deeming7-Apr-22 4:01
mveRichard Deeming7-Apr-22 4:01 
AnswerRe: React date formatting Pin
Jeremy Falcon26-Oct-22 12:01
professionalJeremy Falcon26-Oct-22 12:01 
Questionjava project Pin
Turki F773-Apr-22 15:30
Turki F773-Apr-22 15:30 
AnswerRe: java project Pin
Richard Deeming3-Apr-22 21:26
mveRichard Deeming3-Apr-22 21:26 
QuestionAsync call inside loop finishes later than loop itself Pin
Bohuslav Parenica2-Apr-22 0:51
Bohuslav Parenica2-Apr-22 0:51 
AnswerRe: Async call inside loop finishes later than loop itself Pin
Richard Deeming3-Apr-22 21:33
mveRichard Deeming3-Apr-22 21:33 
AnswerRe: Async call inside loop finishes later than loop itself Pin
Jeremy Falcon26-Oct-22 12:14
professionalJeremy Falcon26-Oct-22 12:14 
QuestionTransforming Excel to Html (javascript) Pin
Member 1554681528-Mar-22 0:09
Member 1554681528-Mar-22 0:09 
GeneralMessage Closed Pin
23-Mar-22 19:02
Richardrussel23-Mar-22 19:02 
QuestionMessage Closed Pin
23-Mar-22 19:00
Richardrussel23-Mar-22 19:00 
QuestionFormulario js Pin
Member 155607559-Mar-22 7:18
Member 155607559-Mar-22 7:18 
AnswerRe: Formulario js Pin
RedDk9-Mar-22 7:33
RedDk9-Mar-22 7:33 
QuestionCreating a responsive menu Pin
Member 1554804125-Feb-22 4:58
Member 1554804125-Feb-22 4:58 
AnswerMessage Closed Pin
25-Feb-22 5:40
Member 1554804125-Feb-22 5:40 
AnswerMessage Closed Pin
25-Feb-22 5:41
Member 1554804125-Feb-22 5:41 

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.