Functions - reusable blocks of codeĪnother essential concept in coding is functions. Here we will look at loop structures in JavaScript. In programming, loops perform this job very well. For example, looking through a list of names. Sometimes you need a task done more than once in a row. In this article we'll explore how conditional structures work in JavaScript. In a weather app, if it is being looked at in the morning, show a sunrise graphic show stars and a moon if it is night. For example, in a game, if the player's number of lives is 0, then it's game over. In any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs. Making decisions in your code - conditionals
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |