This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let list = [true, true, true]; | |
list[1] && console.log('list[1] is something ; ok'); | |
list[5] && console.log('list[5] is something ; err'); | |
if (list[1]) { | |
console.log('if list[1] ; ok'); | |
} | |
if (list[5]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this goes into the "test" tab in postman | |
var response = JSON.parse(responseBody); | |
postman.setEnvironmentVariable("ENV_VAR_NAME", response.token); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react' | |
export default function useScrollUp() { | |
const [init, setInit] = useState(true) | |
useEffect(() => { | |
if (init) { | |
window.scrollTo(0, 0) | |
setInit(false) | |
} |