#reactjs
Read more stories on Hashnode
Articles with this tag
import { useEffect, useState } from "react"; import "./styles.css"; export default function App() { const [seconds, setSeconds] = useState(60); //...
//super keyword is used to call parent class methods here class Car{ constructor(model, name){ this.model = model; this.name =...
let data = [100,2000,8,2,90000,8] // let res = new Set(data) let res = data.filter((ele, index, arr)=>arr.indexOf(ele)!==index)
let data = [100, 2000, 8, 2, 90000, 8] const res = (data) => { return data.reduce(function (prev, cur) { return prev > cur ? prev : cur ...
const arr = [2, 8, 7, 9] const largetValue = (arr) => { let firstLargetValue = Math.max(...arr) index = arr.indexOf(firstLargetValue) ...
import React from 'react'; import { Page, usePDF, Text, Document, StyleSheet, PDFDownloadLink } from '@react-pdf/renderer'; import { Button, Input }...