I share tips to help overwhelmed junior frontend developers 🎉 .
Join for free 👉 https://www.frontendjoy.com/subscribe
Use 𝙳𝚊𝚝𝚎.𝚙𝚊𝚛𝚜𝚎() to convert a date string to a timestamp
Use 𝙳𝚊𝚝𝚎.𝚙𝚊𝚛𝚜𝚎() to convert a date string to a timestamp
Use 𝚕𝚘𝚌𝚊𝚝𝚒𝚘𝚗.𝚛𝚎𝚕𝚘𝚊𝚍() to force reload the current page
Use 𝚕𝚘𝚌𝚊𝚝𝚒𝚘𝚗.𝚛𝚎𝚕𝚘𝚊𝚍() to force reload the current page
Use 𝚍𝚘𝚌𝚞𝚖𝚎𝚗𝚝.𝚍𝚎𝚜𝚒𝚐𝚗𝙼𝚘𝚍𝚎 = "𝚘𝚗" to 𝗺𝗮𝗸𝗲 𝗮𝗻𝘆 𝘄𝗲𝗯𝗽𝗮𝗴𝗲 𝗲𝗱𝗶𝘁𝗮𝗯𝗹𝗲 (great for quick mockups or demos)
Use 𝚍𝚘𝚌𝚞𝚖𝚎𝚗𝚝.𝚍𝚎𝚜𝚒𝚐𝚗𝙼𝚘𝚍𝚎 = "𝚘𝚗" to 𝗺𝗮𝗸𝗲 𝗮𝗻𝘆 𝘄𝗲𝗯𝗽𝗮𝗴𝗲 𝗲𝗱𝗶𝘁𝗮𝗯𝗹𝗲 (great for quick mockups or demos)
Use 𝙿𝚛𝚘𝚖𝚒𝚜𝚎.𝚛𝚎𝚜𝚘𝚕𝚟𝚎(𝚟𝚊𝚕𝚞𝚎) and 𝙿𝚛𝚘𝚖𝚒𝚜𝚎.𝚛𝚎𝚓𝚎𝚌𝚝(𝚎𝚛𝚛𝚘𝚛) to quickly create resolved or rejected promises.
Use 𝙿𝚛𝚘𝚖𝚒𝚜𝚎.𝚛𝚎𝚜𝚘𝚕𝚟𝚎(𝚟𝚊𝚕𝚞𝚎) and 𝙿𝚛𝚘𝚖𝚒𝚜𝚎.𝚛𝚎𝚓𝚎𝚌𝚝(𝚎𝚛𝚛𝚘𝚛) to quickly create resolved or rejected promises.
Use 𝚂𝚝𝚛𝚒𝚗𝚐.𝚛𝚊𝚠 with template literals to output raw strings, ignoring escapes.
Use 𝚂𝚝𝚛𝚒𝚗𝚐.𝚛𝚊𝚠 with template literals to output raw strings, ignoring escapes.
Use 𝙾𝚋𝚓𝚎𝚌𝚝.𝚎𝚗𝚝𝚛𝚒𝚎𝚜() + 𝙰𝚛𝚛𝚊𝚢.𝚏𝚒𝚕𝚝𝚎𝚛() to filter object properties
Use 𝙾𝚋𝚓𝚎𝚌𝚝.𝚎𝚗𝚝𝚛𝚒𝚎𝚜() + 𝙰𝚛𝚛𝚊𝚢.𝚏𝚒𝚕𝚝𝚎𝚛() to filter object properties
Use 𝚍𝚘𝚌𝚞𝚖𝚎𝚗𝚝.𝚑𝚊𝚜𝙵𝚘𝚌𝚞𝚜() to check if the tab is active.
Use 𝚍𝚘𝚌𝚞𝚖𝚎𝚗𝚝.𝚑𝚊𝚜𝙵𝚘𝚌𝚞𝚜() to check if the tab is active.
Use 𝙰𝚛𝚛𝚊𝚢.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚛𝚎𝚍𝚞𝚌𝚎𝚁𝚒𝚐𝚑𝚝() to process arrays from right to left.
Use 𝙰𝚛𝚛𝚊𝚢.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚛𝚎𝚍𝚞𝚌𝚎𝚁𝚒𝚐𝚑𝚝() to process arrays from right to left.
Use 𝙳𝚊𝚝𝚎.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚝𝚘𝙸𝚂𝙾𝚂𝚝𝚛𝚒𝚗𝚐() for easy, standardized timestamps.
Use 𝙳𝚊𝚝𝚎.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚝𝚘𝙸𝚂𝙾𝚂𝚝𝚛𝚒𝚗𝚐() for easy, standardized timestamps.
Use 𝚗𝚊𝚟𝚒𝚐𝚊𝚝𝚘𝚛.𝚖𝚊𝚡𝚃𝚘𝚞𝚌𝚑𝙿𝚘𝚒𝚗𝚝𝚜 to detect if the device supports touch.
Use 𝚗𝚊𝚟𝚒𝚐𝚊𝚝𝚘𝚛.𝚖𝚊𝚡𝚃𝚘𝚞𝚌𝚑𝙿𝚘𝚒𝚗𝚝𝚜 to detect if the device supports touch.
Use 𝙾𝚋𝚓𝚎𝚌𝚝.𝚐𝚎𝚝𝙾𝚠𝚗𝙿𝚛𝚘𝚙𝚎𝚛𝚝𝚢𝙽𝚊𝚖𝚎𝚜() to get all property names, even non-enumerable ones.
Use 𝙾𝚋𝚓𝚎𝚌𝚝.𝚐𝚎𝚝𝙾𝚠𝚗𝙿𝚛𝚘𝚙𝚎𝚛𝚝𝚢𝙽𝚊𝚖𝚎𝚜() to get all property names, even non-enumerable ones.
Use 𝚝𝚢𝚙𝚎𝚘𝚏 𝚟𝚊𝚕𝚞𝚎 === '𝚏𝚞𝚗𝚌𝚝𝚒𝚘𝚗' to safely check if something is callable.
Use 𝚝𝚢𝚙𝚎𝚘𝚏 𝚟𝚊𝚕𝚞𝚎 === '𝚏𝚞𝚗𝚌𝚝𝚒𝚘𝚗' to safely check if something is callable.
Use 𝚂𝚝𝚛𝚒𝚗𝚐.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚛𝚎𝚙𝚎𝚊𝚝() to quickly build repeated patterns.
Use 𝚂𝚝𝚛𝚒𝚗𝚐.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚛𝚎𝚙𝚎𝚊𝚝() to quickly build repeated patterns.
Use 𝙰𝚛𝚛𝚊𝚢.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚏𝚒𝚗𝚍𝙸𝚗𝚍𝚎𝚡() to get the position of the first match in an array.
Use 𝙰𝚛𝚛𝚊𝚢.𝚙𝚛𝚘𝚝𝚘𝚝𝚢𝚙𝚎.𝚏𝚒𝚗𝚍𝙸𝚗𝚍𝚎𝚡() to get the position of the first match in an array.