Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save javad7z7/193b9472449f739d92f87243cecf61d3 to your computer and use it in GitHub Desktop.
Save javad7z7/193b9472449f739d92f87243cecf61d3 to your computer and use it in GitHub Desktop.
Interview
const [color, setColor] = useState("Yellow");
1. What happens if we use let instead of const ?
2. How will the color constant change in the future? (Given that const value is not changeable in JavaScript)
3. Where does the useState hook read the current color value from?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment