Skip to content

Instantly share code, notes, and snippets.

View hebertcisco's full-sized avatar
🎯
Focusing

Hebert F. Barros hebertcisco

🎯
Focusing
View GitHub Profile
@hebertcisco
hebertcisco / forof.ts
Created May 23, 2020 05:28
loop for of loops through iterative objects (including Array, Map, Set, the arguments object and so on), calling a custom function with instructions to be executed for the value of each distinct object.
const mySkills = [
"C#",
"JavaScript",
"TypeScript",
"HTML",
"CSS3",
"Angular",
"ReactJS",
"React Native",
"NodeJs",
@hebertcisco
hebertcisco / forin.ts
Created May 23, 2020 05:28
The for in loop interacts over an object's enumerated properties, in the original order of insertion. The loop can be performed for each distinct object property.
const team = [
{
name: "John Doe",
occupation: "Web Design",
},
{
name: "Jane Doe",
occupation: "photographer",
},
];
@hebertcisco
hebertcisco / for.ts
Created May 23, 2020 05:27
A for loop is a control flow statement to specify the iteration, which allows the code to be executed repeatedly.
const mySkills = [
"C#",
"JavaScript",
"TypeScript",
"HTML",
"CSS3",
"Angular",
"ReactJS",
"React Native",
"NodeJs",
@hebertcisco
hebertcisco / filter.ts
Created May 23, 2020 05:25
The filter() method creates a new array with all the elements that have passed the test implemented by the provided function. Filter only the even numbers of the Fibonacci sequence:
const fibonacciSequence = [
0,
1,
1,
2,
3,
5,
8,
13,
21,
@hebertcisco
hebertcisco / every.ts
Created May 23, 2020 05:24
Say if all users are authorized using age as a parameter:
const ageUser = [
{
name: "Jane Dow",
age: 39,
},
{
name: "John Doe",
age: 39,
},
{
@hebertcisco
hebertcisco / dowhile.ts
Created May 23, 2020 05:23
The do while statement creates a loop that executes a statement until the condition test is false. The condition is evaluated after the code block is executed, resulting in a declaration being executed at least once.
const mySkills = [
"C#",
"JavaScript",
"TypeScript",
"HTML",
"CSS3",
"Angular",
"ReactJS",
"React Native",
"NodeJs",
@hebertcisco
hebertcisco / while.ts
Created May 23, 2020 05:21
The while statement creates a loop that executes a specific routine while the test condition is evaluated as true. The condition is evaluated before the routine is executed.
const mySkills = [
"C#",
"JavaScript",
"TypeScript",
"HTML",
"CSS3",
"Angular",
"ReactJS",
"React Native",
"NodeJs",