nodejs store selected dropdown in variable code example

Example: nodejs store selected dropdown in variable

var selectedValue = user.schoolType;

<select class="form-control" id="schoolType" name="schoolType" value="
{{user.schoolType}}">

  <option value="none" selected="{{user.schoolType === 
this.value}}">None</option>
<option value="public" selected="{{user.schoolType === 
this.value}}">Public</option>
<option value="private" selected="{{user.schoolType === 
this.value}}">Private</option>
<option value="homeSchool" selected="{{user.schoolType === 
this.value}}">Home School</option>
 </select>