mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): Add select value example to step 9 (#62163)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+8
-1
@@ -7,7 +7,14 @@ dashedName: step-9
|
||||
|
||||
# --description--
|
||||
|
||||
Modify your `console.log` call to log the selected value from the dropdown.
|
||||
Modify your `console.log` call to log the selected value from the dropdown.
|
||||
|
||||
You can access the current value of a `select` element using its `.value` property. For example:
|
||||
|
||||
```js
|
||||
const selectEl = document.querySelector("select");
|
||||
const selectValue = selectEl.value;
|
||||
```
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user