• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

Why this returns 103 and not 102?

var x = 1 for(x; x<=10; x++){ x+=x+100 } console.log(x)

javascriptoperators
19th Jan 2022, 5:42 AM
Theoz
Theoz - avatar
1 Answer
+ 3
x = 1 x += 101 x++ console.log(x)
19th Jan 2022, 5:49 AM
Mafdi
Mafdi - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Can you give me some advice on what project I can start with today to practice HTML, CSS, and JavaScript?
0 Votes
I've a HTML code question
0 Votes
@sololearn Python
1 Votes
C++
0 Votes
Appointment Booking website
0 Votes
Building an AI Call Tracking & Routing System — Anyone tried it?
0 Votes
I am asking for your help, I need to optimisate my code.
0 Votes
Activate account
0 Votes
Offline AI Model with Fast Voice Chat
0 Votes
Is this for use
0 Votes