codingwithleo Profile Banner
@codingwithleo Profile
@codingwithleo

@codingwithleo

Followers
2
Following
1
Media
35
Statuses
36

I do the codes + the coffees

Joined June 2019
Don't wanna be here? Send us removal request.
@codingwithleo
@codingwithleo
6 years
What is a for loop? A for loop is a statement to iterate over arrays or objects.⁠⠀ ⁠⠀ It consists of 3 parts, the initialization, the condition and the final expression (which in most cases is an incremental value).⁠⠀ ⁠⠀ In this example, the for … https://t.co/aR6VTEuQfA
0
0
0
@codingwithleo
@codingwithleo
6 years
What is scope? Scope in JavaScript simply means "where an element, data, or value can actually be used" in the script. ⁠⠀ ⁠⠀ In JavaScript, we have two kinds of scope, global scope and local scope.⁠⠀ ⁠⠀ When creating a function a new scope is est… https://t.co/35xpuYefTJ
0
0
0
@codingwithleo
@codingwithleo
6 years
What is the "..." spread operator? The spread operator allows an iterable to spread or expand individually inside a receiver. Iterables are anything that can be looped over such as strings, arrays, and sets. ⁠⠀ ⁠⠀ Screenshot output would return..… https://t.co/8fGRMygIsN
0
0
0
@codingwithleo
@codingwithleo
6 years
What is the Logical AND (&&) operator? The logical operators are typically used with Boolean (logical) values. When they are, they return a Boolean value. ⁠⠀ ⁠⠀ Syntax = (condition) ? true : false.⁠⠀ ⁠⠀ // Screenshot return value is: "I'm logged … https://t.co/75VI7UuzQN
0
0
0
@codingwithleo
@codingwithleo
6 years
What is the Conditional (Ternary) Operator? The ternary operator is a way to shorten your IF statement into one line of code.⁠⠀ ⁠⠀ To break this down a bit further...⁠⠀ ⁠⠀ 1. The condition is what you’re actually testing. The result of your condi… https://t.co/xlY84fDPNJ
0
0
0
@codingwithleo
@codingwithleo
6 years
What is an if statement? The if statement executes a statement if a specified condition is truthy. If the condition is falsy, another statement can be executed.⁠⠀ ⁠⠀ #javascript #js #ifstatment #jsconditional #code #webdev #devlife #webdevelopment #p https://t.co/JMWAHQOzpu
0
2
1
@codingwithleo
@codingwithleo
6 years
What is the Array.reduce() method? Array.reduce() is a method that takes the input values of an array and returns a single value. It uses callback function which consists of an accumulator (a value that accumulates each piece of the array), the value its… https://t.co/rGCd4CEQTy
0
0
0
@codingwithleo
@codingwithleo
6 years
What is the Array.filter() method? Array.filter() is a very handy shortcut when we have an array of values and want to filter those values into another array, where each value in the new array is a value that passes a specific test.⁠⠀ ⁠⠀ // Screensho… https://t.co/gdLZeW6oV3
0
0
0
@codingwithleo
@codingwithleo
6 years
What is a JavaScript boolean? A boolean is a datatype that returns either of two values i.e. true or false. In JavaScript, boolean is used as a function to get the value of a variable, object, conditions, expressions etc. in terms of true or false.⁠⠀… https://t.co/eMmPbboB12
0
0
0
@codingwithleo
@codingwithleo
6 years
What is a JavaScript object? Objects in JavaScript are collections of key/value pairs. The values can consist of properties and methods, and may contain all other JavaScript data types, such as strings, numbers, and Booleans.⁠⠀ ⁠⠀ #javascript #js #le https://t.co/jckKhrSZmJ
0
1
0
@codingwithleo
@codingwithleo
6 years
What is an Array? An array is a single variable that is used to store different elements. It is often used when we want to store list of elements and access them by a single variable. ⁠⠀ ⁠⠀ #javascript #javascriptarray #array #js #learningtocode #lea https://t.co/i3fR7apBoY
0
0
1
@codingwithleo
@codingwithleo
6 years
What is var? Unlike some of it's companions var is rather a keyword which defines a variable globally regardless of block scope.⁠⠀ ⁠⠀ #javascript #javascriptcode #learnjavascript #learningjavascript #javascript101 #codenewbie #webdev #webdevelopment https://t.co/812svlUwRG
0
2
1
@codingwithleo
@codingwithleo
6 years
What is let? let allows you to declare variables that are limited to a scope of a block statement, or expression on which it is used.⁠⠀ ⁠⠀ #javascript #javascriptcode #javascriptsyntax #learnjavascript #learningjavascript #javascript101 #codenewbie #… https://t.co/lCyBTpdNik
0
1
1
@codingwithleo
@codingwithleo
6 years
What is const? Constants are block-scoped, much like variables defined using the let statement. The value of a constant cannot change through reassignment, and it can't be redeclared.⁠⠀ ⁠⠀ #javascript #javascriptcode #javascriptsyntax #learnjavascrip https://t.co/9K4eK4VBF4
0
0
0
@codingwithleo
@codingwithleo
6 years
How to write an arrow function in Javascript. In this example you can see that the function itself has been assigned to the "arrowFunction" variable.⁠⠀ ⁠⠀ You'll also notice that we have the one parameter defined - this means the parentheses do not a… https://t.co/FxeYaLIJt6
0
0
1
@codingwithleo
@codingwithleo
6 years
Code snippet example of two different ways to write a basic function component in React⁠ ⁠⠀ ⁠⠀ #react #reactjs #functioncomponents #jsx #js #javascript #codesnippet #coder #dev #webdev #webdevelopment #frontend #frontenddev #codesyntax #programmi https://t.co/jZ8CbHJVyG
0
6
4
@codingwithleo
@codingwithleo
6 years
0
3
1
@codingwithleo
@codingwithleo
6 years
Example component showing the useEffect hook being implemented.⁠⠀ ⁠⠀ Reminder: The Effect Hook lets you perform side effects in function components.⁠⠀ ⁠⠀ #react #reactjs #javascript #js #learntocode #frontenddev #webdev #webdevelopment #programmi https://t.co/14eR3eJphv
0
1
2
@codingwithleo
@codingwithleo
6 years
How to use Effect React Hooks by importing the {useEffect} single named export. ⁠⠀ ⁠⠀ If you're familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillUnmount combin… https://t.co/1pgRxD6xiS
0
0
0