Toggle navigation
Email or Username
Password
Remember
Login
Register
|
I forgot my password
Questions
Unanswered
Tags
Users
Ask a Question
Where did I get the infinity?
0
like
0
dislike
4
views
Good day to all.
Prompt because of what there is here an infinite loop and how to fix it:
var m_1 = 0 while (m_1 <= 10){ if (m_1 === 3){ continue; } console.log (m_1+1) m_1 = m_1 + 1 }
Thanks in advance!
javascript
asked
Apr 14, 2019
by
HighwayToCode
|
4
views
answer
comment
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
0
like
0
dislike
var m_1 = 0
while (m_1 <= 10){
if (m_1 === 3){
m_1 = m_1 + 1; // you forgot to change the value and it "froze" on 3
continue;
}
console.log (m_1+1)
m_1 = m_1 + 1
}
answered
Apr 16, 2019
by
Codebaker
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
The case when is better to use for when you need to protonirovanie a certain number of times.
answered
Apr 16, 2019
by
profesor08
ask related question
comment
Please
log in
or
register
to add a comment.
Related questions
0
like
0
dislike
4
answers
How to write a function with parameters from zero to infinity?
asked
Aug 1, 2019
by
belokurov
programming
0
like
0
dislike
1
answer
How to replace cells in a PostgreSQL column of type "infinity" on NaN?
asked
Jun 12, 2019
by
Smeilz1
postgresql
0
like
0
dislike
1
answer
What focus point selects the lens when set to infinity?
asked
Apr 9, 2019
by
NaitonOlgran
lenses
0
like
0
dislike
4
answers
How to implement infinite scrolling (infinity scroll) for iblocks Bitrix?
asked
Apr 1, 2019
by
TARAKANhoy
ajax
php
jquery
0
like
0
dislike
4
answers
How to implement infinite scrolling (infinity scroll) for iblocks Bitrix?
asked
Apr 1, 2019
by
TARAKANhoy
ajax
php
jquery
Most popular tags
javascript
php
css
html
jquery
wordpress
python
linux
web-development
mysql
android
windows
java
layout
c#
computer-networks
node.js
cpp
iron
yii
vue.js
1C-Bitrix
react
laravel
django
nginx
system-administration
search-engine-optimization
api
ubuntu
the-it-education.
ajax
sql
programming
hosting
cms
design
apache
google-chrome
bootstrap
Vkontakte
macos
google
network-administration
git
laptops
algorithms
regular-expressions
unity-game-engine
email
angular
database
network-equipment
software
wooŃommerce
debian
.net
ios
information-security
video
law-in-it
browsers
books
parsing
wi-fi
game-development
career
htaccess
postgresql
telegram
mikrotik
mobile-development
ruby-on-rails
the-domain-name-system
modx
Yandex
c
json
opencart
Habr
freelance
vpn
asp.net
windows-server
symfony
bots
hard-drives
math
qt
DIY
audio
frontend
payment-system
bash
electronics
gulp.js
user-interface
docker
online-shopping
110,608
questions
257,186
answers
0
comments
33,851
users