What do you know about...
Trailing Commas in Function Parameters
JavaScript ES7 allows developers to include trailing commas in function parameters, which can make it easier to add or remove parameters without changing the syntax. Here is an example code for using trailing commas in function parameters:
/* Trailing Commas in Function Parameters */ function myFunction(param1, param2,) { console.log(param1, param2); } myFunction("hello", "world",);
What do you know about...
Array.prototype.includes()
Array.prototype.includes() is a new method in JavaScript that checks if an array includes a specific value. Here is an example code for using Array.prototype.includes():
/* Array.prototype.includes() */ let myArray = [1, 2, 3]; console.log(myArray.includes(2)); // true console.log(myArray.includes(4)); // false
What do you know about...
String.prototype.padStart() and String.prototype.padEnd()
String.prototype.padStart() and String.prototype.padEnd() are two new methods in JavaScript that pad a string with a given character or string. Here is an example code for using String.prototype.padStart() and String.prototype.padEnd():
/* String.prototype.padStart() and String.prototype.padEnd() */ let myString = "hello"; console.log(myString.padStart(8, "*")); // "**hello" console.log(myString.padEnd(8, "*")); // "hello**"
What do you know about...
Array.prototype.flat()
Array.prototype.flat() is a new method in JavaScript that flattens nested arrays. Here is an example code for using Array.prototype.flat():
/* Array.prototype.flat() */ let myArray = [1, [2, 3], [4, [5, 6]]]; let flatArray = myArray.flat(); console.log(flatArray); // [1, 2, 3, 4, [5, 6]]
What do you know about...
Object.getOwnPropertyDescriptors()
Object.getOwnPropertyDescriptors() is a new method in JavaScript that returns an object containing all property descriptors of a given object. Here is an example code for using Object.getOwnPropertyDescriptors():
/* Object.getOwnPropertyDescriptors() */ let myObject = { name: "John", age: 30, get fullName() { return `${this.name} Doe`; }, }; let descriptors = Object.getOwnPropertyDescriptors(myObject); console.log(descriptors);
What do you know about...
Await
Await is a new keyword in JavaScript that can only be used inside async functions. It pauses the execution of the async function until the promise is resolved or rejected. Here is an example code for using await:
/* Await */ async function myFunction() { let result = await fetch("https://api.example.com/data"); let data = await result.json(); console.log(data); }
What do you know about...
Optional Chaining (?.)
Optional chaining (?.) is a new operator in JavaScript that allows developers to safely access nested properties or methods that may not exist without causing an error. Here is an example code for using optional chaining:
/* Optional Chaining */ let myObject = { name: "John", address: { city: "Anytown" } }; console.log(myObject.address?.city); // "Anytown" console.log(myObject.address?.zip); // undefined
What do you know about...
Promise.prototype.finally()
Promise.prototype.finally() is a new method in JavaScript ES7 that allows developers to execute code after a promise is settled, whether it was fulfilled or rejected. Here is an example code for using Promise.prototype.finally():
/* Promise.prototype.finally() */ Promise.resolve("hello") .then(result => console.log(result)) .finally(() => console.log("done"));
What do you know about...
Object.values()
Object.values() is a new method in JavaScript that returns an array of values from an object. Here is an example code for using Object.values():
/* Object.values() */ let myObject = { name: "John", age: 30 }; let values = Object.values(myObject); console.log(values); // ["John", 30]
What do you know about...
Nullish Coalescing Operator (??)
The nullish coalescing operator (??) is a new operator in JavaScript that returns the right operand if the left operand is null or undefined, otherwise it returns the left operand. Here is an example code for using the nullish coalescing operator:
/* Nullish Coalescing Operator */ let myValue = null; let result = myValue ?? "default"; console.log(result); // "default"
What do you know about...
Object.entries()
Object.entries() is a new method in JavaScript that returns an array of key-value pairs from an object. Here is an example code for using Object.entries():
/* Object.entries() */ let myObject = { name: "John", age: 30 }; let entries = Object.entries(myObject); console.log(entries);
// [["name", "John"], ["age", 30]]
What do you know about...
Async Functions
Async functions are a new way of writing asynchronous code in JavaScript. They allow developers to write asynchronous code that looks like synchronous code, which can make it easier to understand and debug. Here is an example code for using async functions:
/* Async Function */ async function myFunction() { let result = await fetch("https://api.example.com/data"); let data = await result.json(); console.log(data); }
What do you know about...
Array.prototype.flatMap()
Array.prototype.flatMap() is a new method in JavaScript that combines map and flat in a single method. It first maps each element using a mapping function, then flattens the result into a new array. Here is an example code for using Array.prototype.flatMap():
/* Array.prototype.flatMap() */ let myArray = [1, 2, 3]; let newArray = myArray.flatMap(x => [x, x * 2]); console.log(newArray); // [1, 2, 2, 4, 3, 6]
What do you know about...
BigInt
BigInt is a new primitive data type in JavaScript ES7 that can represent integers with arbitrary precision. BigInts can be created by appending the letter "n" to an integer literal or by using the BigInt() constructor. Here is an example code for using BigInt:
/* BigInt */ let myBigInt = 12345678901234567890n; console.log(myBigInt);
What do you know about...
Exponentiation Operator
The exponentiation operator, also known as the power operator, is a new operator in JavaScript that raises the left operand to the power of the right operand. Here is an example code for using the exponentiation operator:
/* Exponentiation Operator */ let x = 2; let y = 3; console.log(x ** y); // 8
Web Development Courses
-
Build professional projects for your portfolio
-
Master CSS, HTML and JavaScript
-
Learn to use popular frontend frameworks and libraries such as Vue.js, React.js, Bootstrap and Tailwind CSS
Web Development Quizzes
-
Flexible study option that you can access anytime
-
Helps you identify areas that need improvement.
-
Topics such as HTML, CSS, JavaScript, responsive design, accessibility, and more
Frontend Developer Challenges
-
Suitable for frontend web developers of all levels
-
Encourages you to think outside the box
-
A great way to practice and apply your knowledge in a real-world context
Free Website Templates
-
Saves you time and effort by providing ready-to-use templates
-
Strong foundation for building your own custom websites
-
Perfect for learners who want to experiment with different designs and layouts
Frontend HTML Snippets
-
Saves you time and effort by providing ready-to-use code
-
Wide range of components, such as navbar, carousel, modal, and more
-
Library of HTML code snippets to streamline your frontend web development workflow
Frontend Tech Terminology
-
Suitable for learners of all levels
-
Comprehensive glossary of frontend web development terms
-
Covers key concepts and terminology related to HTML, CSS, JavaScript, responsive design, accessibility, and more
Bootstrap Utility API Guide
-
A comprehensive guide to Bootstrap's utility API
-
Provides practical examples and code snippets
-
A valuable resource for building responsive and accessible websites with Bootstrap