Nothing new at the moment
Loading...
a-stands4-A
Introduction When we say the word “bake”, it calls to mind a familiar subroutine— preheating an oven, putting something into an oven for a set amount of time, and finally removing it. This allows us to abstract away a lot of the details and communicate key concepts more concisely. Higher-order functions are functions that accept other functions as arguments and/or return functions as output. This enables us to build abstractions on other abstractions, just like “We hosted a birthday party” is an abstraction that may build on the abstraction “We made a cake...
1 day ago
a-stands4-A
A loop is a programming tool that repeats a set of instructions until a specified condition, called a stopping condition is reached. The For Loop A for loop contains three expressions separated by ; inside the parentheses: Looping through Arrays To loop through each element in an array, a for loop should use the array’s .length property in its condition. Nested Loops When we have a loop running inside another loop, we call that a nested loop. One use for a nested for loop is to compare the elements in two arrays...
5 days ago
a-stands4-A
One way we can create an array is to use an array literal. An array literal creates an array by wrapping items in square brackets []. Remember from the previous exercise, arrays can store any data type. We can also save an array to a variable. Each element in an array has a numbered position known as its index. // Обратная индексация не работает, в отличии от Python Update Elements Once you have access to an element in an array, you can update its value. // Изменение через переменную позволяет менять...
6 days ago
a-stands4-A
You can think of scope like the view of the night sky from your window. Everyone who lives on the planet Earth is in the global scope of the stars. The stars are accessible globally. Meanwhile, if you live in a city, you may see the city skyline or the river. The skyline and river are only accessible locally in your city, but you can still see the stars that are available globally. Blocks and Scope We’ve seen blocks used before in functions and if statements. A block is the code found inside a set of curly braces {}. Blocks help us group one or more statements together and serve as an important structural marker for our code...
1 week ago
a-stands4-A
A function is a reusable block of code that groups together a sequence of statements to perform a specific task. One way to create a function is by using a function declaration. Just like how a variable declaration binds a value to a variable name, a function declaration binds a function to a name, or an identifier. A function declaration does not ask the code inside the function body to run, it just declares the existence of the function. The code inside a function body runs, or executes, only when the function is called...
2 weeks ago
Subscribe if you like this
That way, you'll never miss a story by this author
a-stands4-A
We’ll be covering the following concepts: So if you’re ready to learn these concepts go to the next lesson— else, read over the concepts, observe the diagram, and prepare yourself for this lesson! The if statement is composed of: The else statement: Here is a list of some handy comparison operators and their syntax: here are three logical operators: Falsy values— or evaluate to false when checked as a condition. The list of falsy values includes: Проверка на логические условия идёт слева направо,...
2 weeks ago
Updating