This repository contains a series of projects focusing on ES6 basics and advanced concepts in JavaScript programming. Each project is designed to enhance your understanding of ES6 features and improve your skills in software linting.
- 0x00. ES6 Basics
- Weight: 1
- Project Duration: May 27, 2024, 6:00 AM - May 28, 2024, 6:00 AM
- Concepts Covered:
- JavaScript programming
- Software Linter
- Learning Objectives:
- Understand what ES6 is and its new features
- Differentiate between constants and variables
- Implement block-scoped variables
- Utilize arrow functions and default parameters
- Apply rest and spread function parameters
- Implement string templating in ES6
- Create objects and manipulate their properties in ES6
- Understand iterators and for-of loops
- All files executed on Ubuntu 18.04 LTS using NodeJS 12.11.x
- Allowed editors: vi, vim, emacs, Visual Studio Code
- All files should end with a new line
- A
README.md
file at the root of the project folder - Code files should use the
.js
extension - Testing with Jest Testing Framework
- Code analysis with ESLint using specific rules provided
- All functions must be exported
- Install NodeJS 12.11.x:
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt install nodejs -y
- Verify NodeJS and npm versions:
nodejs -v npm -v
- Install Jest, Babel, and ESLint:
npm install
package.json
- Contains scripts for linting, testing, and development environment setup.
babel.config.js
- Babel configuration for preset environment targeting the current Node.js version.
.eslintrc.js
- ESLint configuration for linting rules, environment setup, and plugin configuration.
-
Const or let?
- Modify functions to use
const
orlet
variables as appropriate.
- Modify functions to use
-
Block Scope
- Update variables to avoid overwriting inside conditional blocks.
-
Arrow functions
- Rewrite functions using ES6 arrow function syntax.
-
Parameter defaults
- Condense function internals using default parameter values.
-
Rest parameter syntax for functions
- Modify a function to return the number of arguments passed using the rest parameter syntax.
-
The wonders of spread syntax
- Concatenate arrays and a string using spread syntax.
-
Take advantage of template literals
- Rewrite function return statements to use template literals.
-
Object property value shorthand syntax
- Update an object's property assignment to use shorthand syntax.
-
No need to create empty objects before adding in properties
- Rewrite a function to use ES6 computed property names.
-
ES6 method properties
- Rewrite a function to use ES6 method properties.
-
For...of Loops
- Rewrite a function to use ES6's
for...of
loop.
- Rewrite a function to use ES6's
-
Iterator
- Write a function to create an iterator for every employee in every department.
-
Iterating through report objects
- Write a function to iterate through report objects and return every employee name in a string.
-
Iterate through object
- Write a function to iterate through an object and return employee names.
- GitHub Repository: alx-backend-javascript
- Directory: 0x00-ES6_basic
- Contact: Paschal Ugwu
Copyright © 2024 ALX, All rights reserved.