A dataset containing named CSS colors.
From MDN: CSS Colors.
/* class, constructor, object */ | |
class Student { | |
constructor(name, id) { | |
this.name = name; | |
this.id = id; | |
this.university = "Harvard University"; | |
} | |
} | |
const student1 = new Student("Tom Hardy", 101); |
/* inheritance, extends, super */ | |
class Parent { | |
constructor() { | |
this.fatherName = "Christopher Nolan"; | |
this.motherName = "Emma Thomas"; | |
} | |
} | |
class Child extends Parent { | |
constructor(name, age) { | |
super(); |
function HelloWorld() { | |
return ( | |
<div> | |
<h3>Hello World!</h3> | |
</div> | |
); | |
} |
function App() { | |
return ( | |
<div> | |
<HelloWorld name='Hello World'></HelloWorld> | |
<HelloWorld name='Hello Bangladesh'></HelloWorld> | |
</div> | |
); | |
} | |
function HelloWorld(props) { | |
return ( |
function App() { | |
const products = [ | |
{ name: "Photoshop", price: "$4.00" }, | |
{ name: "Figma", price: "$5.00" }, | |
{ name: "Sketch", price: "$6.00" }, | |
]; | |
return ( | |
<div> | |
<Products |
function App() { | |
const products = [ | |
{ name: "Photoshop", price: "$4.00" }, | |
{ name: "Figma", price: "$5.00" }, | |
{ name: "Sketch", price: "$6.00" }, | |
{ name: "After Efects", price: "$26.00" }, | |
{ name: "Premier pro", price: "$96.00" }, | |
]; | |
return ( |
import React, { useState } from "react"; | |
function App() { | |
return ( | |
<div> | |
<Counter /> | |
</div> | |
); | |
} |
import React, { useState, useEffect } from "react"; | |
function App() { | |
return ( | |
<div> | |
<Users /> | |
</div> | |
); | |
} |
const characterMap = (str) => { | |
const charMap = {}; | |
str.split("").forEach((char) => { | |
if (charMap[char]) { | |
charMap[char]++; | |
} else { | |
charMap[char] = 1; | |
} | |
}); |
A dataset containing named CSS colors.
From MDN: CSS Colors.