Hi, I did a simple loop in JSFiddle but dispite the code being error free, JSFiddle doesn't run the code even though the framework is set on PureJS ?
Siberian
13
Junior Poster
Recommended Answers
Jump to PostShare your jsFiddle with us?
Jump to PostI'm not sure what
write()
is but this code works herevar dr = 4; for (i=0;i<dr;i++) { console.log("what"); }
If you open the console you will see it output 4 "what" there.
Jump to PostYes the console from any modern browser. Console.log is commonly used in dev to check you variable's values and test your code.
Jump to PostI should use console log instead of JsFiddle for JS, alright thanks
I surely didnt say that or imply that. console.log is a method that allows you to write to the console. that's about it. Its not comparible to jsFiddle. If you were using jsFiddle for this purpose, …
Jump to PostThe code that pixelsoul provided produces an output of "what" 4 times for me. Your sample code above is not the same as his with regards to the loop.
All 19 Replies
pixelsoul
272
Red Pill
Featured Poster
Siberian
13
Junior Poster
pixelsoul
272
Red Pill
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
Siberian
13
Junior Poster
pixelsoul
272
Red Pill
Featured Poster
Siberian
13
Junior Poster
pixelsoul
272
Red Pill
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.