Jump to content

Search the Community

Showing results for tags 'while'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. hi, I have a gameProgress (e) where each position in my array are stars (1,2) or blocked levels (-1) I want to count the position of the blocked level so i use this ; var e=[1,2,1,1,-1]; var n = 0; while (e[n] < 0) { n++; var position=n; } console.log(position); // expected output: 4 and result is 3 ??? but the result is not 4 => e=[1,2,1,1,-1] could you tell me why ?
×
×
  • Create New...