Skip to content

Instantly share code, notes, and snippets.

@MichaelrMentele
Created August 11, 2022 14:59
Show Gist options
  • Save MichaelrMentele/1b0ef55f84f43aa8a6d225dd0a6ccba6 to your computer and use it in GitHub Desktop.
Save MichaelrMentele/1b0ef55f84f43aa8a6d225dd0a6ccba6 to your computer and use it in GitHub Desktop.
Quiz for writing more idiomatic JS code
// 1. how would you refactor this function signature? what is problematic about it?
const someFunc = (A, B, C, D = 3, E, F, G = 'default') => { ... }
// 2. see below
myString = "Some string."
b = myString[myString.length - 1] // -> b = myString.slice(-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment