Deleting all browser default styles for an element.
instead of using all these
button{
backgound:none
border:none
color: inherit
font:inherit
outline:non
padding:0
}
use:
button{
all:unset
}
It will unset all your element styles.
Search for a command to run...
instead of using all these
button{
backgound:none
border:none
color: inherit
font:inherit
outline:non
padding:0
}
use:
button{
all:unset
}
It will unset all your element styles.
No comments yet. Be the first to comment.
let arr = [1,2,2,4,5,6,6,7,7] let res = arr.filter((item, index)=>arr.indexOf(item) !== index).sort((a,b)=>a-b) console.log(res)
import { useEffect, useState } from "react"; import "./styles.css"; export default function App() { const [seconds, setSeconds] = useState(60); // Initial value is set to 60 seconds useEffect(() => { const timerId = setInterval(() => { ...
function reverseEachWord(sentence) { const words = sentence.split(' '); // Split the sentence into words const reversedWords = words.map(word => word.split('').reverse().join('')); // Reverse each word const reversedSentence = reversedW...
import { useRef } from "react"; import "./styles.css"; export default function App() { const inputRef = useRef();const handleFunction = () => { inputRef.current.focus() }return ( <div className="App"> <input ref={inputRef} type="text" /> <button onCl...

function flattenArray(arr){ let flattened = []; function flatten(ArrElem){ for(let i=0;i<ArrElem.length; i++){ if(Array.isArray(ArrElem[i])){ flatten(ArrElem[i]) } else{ flattened.push(ArrElem[i]) } } } flatten(arr) return flattened } let arr = [1, 2...