From the course: JavaScript: Best Practices for Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Assign values

Challenge: Assign values - JavaScript Tutorial

From the course: JavaScript: Best Practices for Data

Start my 1-month free trial

Challenge: Assign values

(upbeat bouncy music) - [Narrator] Ready to assign values using best practices? It's time for a challenge. My start code make some random selections from an array, an assigns them as first, second and third choices, which are saved in an object with a user name. There's no need to worry about functionality here, or optimizing the code. Instead, focus on implementing strategies for assigning values to variables, that make better organized and predictable code. Add rules as appropriate to .ESLint RC, to check for issues, as well as fixing those issues in the app.js file. This exercise should take you about 10 minutes. When you're done, join me in the next video and I'll walk you through how I approached it.

Contents