Change location for data files
This commit is contained in:
1 parent
b741a0e1ee
commit
b6a0255f12
2772 files changed
+30
-30
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
# [var] keyword
|
||||
|
||||
The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [var keyword - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var)
|
||||
- [JavaScript Variables](https://javascript.info/variables)
|
||||
- [JavaScript Variables - W3Schools](https://www.w3schools.com/js/js_variables.asp)
|
||||
- [Declaring Variables without Var, Let, Const - What Would Happen?](https://www.youtube.com/watch?v=6UAKBYpUC-Y)
|
||||
- [How to declare variables in different ways in JavaScript?](https://www.geeksforgeeks.org/how-to-declare-variables-in-different-ways-in-javascript/)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# [let] keyword
|
||||
|
||||
The `let` declaration declares a block-scoped local variable, optionally initializing it to a value.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [let keyword - MDN Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)
|
||||
- [JavaScript Variables](https://javascript.info/variables)
|
||||
- [How to declare variables in different ways in JavaScript?](https://www.geeksforgeeks.org/how-to-declare-variables-in-different-ways-in-javascript/)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# [const] keyword
|
||||
|
||||
Constants are block-scoped, much like variables declared using the `let` keyword. The value of a constant can't be changed through reassignment (i.e. by using the assignment operator), and it can't be redeclared (i.e. through a variable declaration). However, if a constant is an object or array its properties or items can be updated or removed.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Constants - CodeGuage](https://www.codeguage.com/courses/js/constants)
|
||||
- [const keyword - MDN Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)
|
||||
- [JavaScript Variables](https://javascript.info/variables)
|
||||
- [How to declare variables in different ways in JavaScript?](https://www.geeksforgeeks.org/how-to-declare-variables-in-different-ways-in-javascript/)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# Variable Declarations
|
||||
|
||||
To use variables in JavaScript, we first need to create it i.e. declare a variable. To declare variables, we use one of the `var`, `let`, or `const` keywords.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [Storing the information you need — Variables](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables)
|
||||
- [JavaScript Variables - CodeGuage](https://www.codeguage.com/courses/js/variables)
|
||||
@@ -0,0 +1,9 @@
|
||||
# Hoisting
|
||||
|
||||
JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables, or classes to the top of their scope, prior to execution of the code.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [What is Hoisting - MDN Docs](https://developer.mozilla.org/en-US/docs/Glossary/Hoisting)
|
||||
- [JavaScript Hoisting](https://www.geeksforgeeks.org/javascript-hoisting/)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Naming Rules
|
||||
|
||||
A variable name should accurately identify your variable. When you create good variable names, your JavaScript code becomes easier to understand and easier to work with. Properly naming variables is really important. JavaScript also has some rules when it comes to naming variables; read about these rules through the links below.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Variable Naming Tips - CodeGuage](https://www.codeguage.com/courses/js/variables#Tips_for_naming_variables)
|
||||
- [Understanding Variables in JavaScript](https://www.informit.com/articles/article.aspx?p=131025&seqNum=3)
|
||||
- [Naming JavaScript Variables](https://www.dummies.com/article/technology/programming-web-design/javascript/naming-javascript-variables-142522/)
|
||||
- [JavaScript Naming Conventions](https://www.robinwieruch.de/javascript-naming-conventions/)
|
||||
- [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)
|
||||
@@ -0,0 +1,8 @@
|
||||
# Block Scope
|
||||
|
||||
This scope restricts the variable that is declared inside a specific block, from access by the outside of the block. The let & const keyword facilitates the variables to be block scoped. In order to access the variables of that specific block, we need to create an object for it. Variables declared with the var keyword, do not have block scope.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)
|
||||
- [Block Scoping in JavaScript](https://www.geeksforgeeks.org/javascript-es2015-block-scoping)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# Function Scope
|
||||
|
||||
When a variable is declared inside a function, it is only accessible within that function and cannot be used outside that function.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)
|
||||
- [Function Scope & Block Scope in JS](https://medium.com/nerd-for-tech/function-scope-block-scope-in-js-d29c8e7cd216)
|
||||
- [All about Functions and Scopes in JavaScript](https://www.geeksforgeeks.org/all-about-functions-and-scopes-in-javascript/)
|
||||
@@ -0,0 +1,9 @@
|
||||
# Global Scope
|
||||
|
||||
Variables declared Globally (outside any function) have Global Scope. Global variables can be accessed from anywhere in a JavaScript program. Variables declared with `var`, `let` and `const` are quite similar when declared outside a block.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Scopes
|
||||
|
||||
In JavaScript, scope refers to the visibility of a variable or how it can be used after it is declared. The scope of a variable depends on the keyword that was used to declare it.
|
||||
|
||||
The three types of Scope are Global Scope, Function Scope, and Block Scope. Before ES6 (2015), JavaScript had only Global Scope and Function Scope with the `var` keyword. ES6 introduced `let` and `const` which allow Block Scope in JavaScript.
|
||||
|
||||
Global Scope: Variables declared outside any function or curly braces '{}' have Global Scope, and can be accessed from anywhere within the same Javascript code. `var`, `let` and `const` all provide this Scope.
|
||||
|
||||
Function Scope: Variables declared within a function can only be used within that same function. Outside that function, they are undefined. `var`, `let` and `const` all provide this Scope.
|
||||
|
||||
Block Scope: A block is any part of JavaScript code bounded by '{}'. Variables declared within a block can not be accessed outside that block. This Scope is only provided by the `let` and `const` keywords. If you declare a variable within a block using the `var` keyword, it will NOT have Block Scope.
|
||||
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)
|
||||
@@ -0,0 +1,8 @@
|
||||
# Javascript Variables
|
||||
|
||||
Most of the time, a JavaScript application needs to work with information. To store and represent this information in the JavaScript codebase, we use variables. A variable is a container for a value.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [JavaScript Variables](https://javascript.info/variables)
|
||||
- [Storing the information you need — Variables](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables)
|
||||
Reference in new issue
Block a user