Skip to content

Instantly share code, notes, and snippets.

View iamsaief's full-sized avatar
🚀
Gotta debug before I sleep ⏳

Saief Al Emon iamsaief

🚀
Gotta debug before I sleep ⏳
View GitHub Profile
/* 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>
);
}
@iamsaief
iamsaief / string-character-map.js
Last active August 20, 2021 08:49
Returns character frequencies of given string
const characterMap = (str) => {
const charMap = {};
str.split("").forEach((char) => {
if (charMap[char]) {
charMap[char]++;
} else {
charMap[char] = 1;
}
});
@iamsaief
iamsaief / README.MD
Created September 28, 2021 19:59
CSS Named Colors