JS
challenger
Home
JavaScript Basics
arrays
Find the Chocolate's Position
Find the Chocolate's Position
You have a box of assorted chocolates. Use the indexOf method to find the position of your favorite flavor in the box and store it in a variable called position.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console