Click here to Skip to main content
15,394,163 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
Membergosipp24-Apr-22 21:42 
QuestionReloading a wav file after ended Pin
Burketa219-Apr-22 7:24
MemberBurketa219-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
MemberAlex Dunlop18-Apr-22 19:25 
QuestionLoops, someone to help me Pin
FranciscaNunes200412-Apr-22 10:30
MemberFranciscaNunes200412-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
MemberMember 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
professionalSimon_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 
Questionjava project Pin
Turki F773-Apr-22 15:30
MemberTurki 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
MemberBohuslav 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 
QuestionTransforming Excel to Html (javascript) Pin
Member 1554681528-Mar-22 0:09
MemberMember 1554681528-Mar-22 0:09 
GeneralMessage Closed Pin
23-Mar-22 19:02
MemberRichardrussel23-Mar-22 19:02 
QuestionMessage Closed Pin
23-Mar-22 19:00
MemberRichardrussel23-Mar-22 19:00 
QuestionFormulario js Pin
Member 155607559-Mar-22 7:18
MemberMember 155607559-Mar-22 7:18 
AnswerRe: Formulario js Pin
RedDk9-Mar-22 7:33
MemberRedDk9-Mar-22 7:33 
QuestionCreating a responsive menu Pin
Member 1554804125-Feb-22 4:58
MemberMember 1554804125-Feb-22 4:58 
AnswerMessage Closed Pin
25-Feb-22 5:40
MemberMember 1554804125-Feb-22 5:40 
AnswerMessage Closed Pin
25-Feb-22 5:41
MemberMember 1554804125-Feb-22 5:41 
AnswerRe: Creating a responsive menu Pin
Member 1554804125-Feb-22 5:44
MemberMember 1554804125-Feb-22 5:44 
AnswerRe: Creating a responsive menu Pin
Richard Deeming27-Feb-22 21:12
mveRichard Deeming27-Feb-22 21:12 

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.