Something i don't understand is that, in your post title, you've mentioned that you're using javascript, but, to display something in the console using javascript, you should use console.log not print because the print command displays the pop window to print something with your printer.
yes i use 2 online compiler to learn basics right now jsbin and other one, one of them needs print to print out the result, i went to check on both sites before posting here thats why this copy paste i did here was with print command, thanks for solving this code for me, hit a like so bad on that, little bit stupid i think of me
I don't use continue often but doesn't it break the loop iteration? Meaning that would lead to an infinite loop in the while example because i would not get incremented.
Yeah, i forgot that point, if you're using a while loop, you should increment i before the if statement. otherwise, it will create an infinite loop. If you're using a for loop, the code i wrote above is OK
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Probably something like this would do the job.
You could also do the same thing using a for-loop
Something i don't understand is that, in your post title, you've mentioned that you're using javascript, but, to display something in the console using javascript, you should use
console.lognotprintbecause theprintcommand displays the pop window to print something with your printer.ah thank you man! appreciate it so much!
yes i use 2 online compiler to learn basics right now jsbin and other one, one of them needs print to print out the result, i went to check on both sites before posting here thats why this copy paste i did here was with print command, thanks for solving this code for me, hit a like so bad on that, little bit stupid i think of me
I don't use continue often but doesn't it break the loop iteration? Meaning that would lead to an infinite loop in the while example because i would not get incremented.
Yeah, i forgot that point, if you're using a while loop, you should increment
ibefore the if statement. otherwise, it will create an infinite loop. If you're using a for loop, the code i wrote above is OK