How to know the list value?

Is the html code:
<select id="typeCompany">
 <option value="0">ZAO</option>
 <option value="1">SP</option>
 <option value="2">MUP</option>
</select>


You must obtain a company.

Have done so:
obj = document.querySelector("select[id=typeCompany]")
document.querySelector("select[id=typeCompany] > option[value=" + obj.value + "]").innerText

Not working, says
Failed to execute 'querySelectorAll' on 'Document': 'option[value=0]' is not a valid selector.

document.querySelectorAll("option[value=0]")
On this answers the same.
Why?
March 23rd 20 at 19:21
1 answer
March 23rd 20 at 19:23
Solution
document.querySelectorAll("option[value='0']")
Why, then, with the strings without the quotes roll? - bobby_Keeling commented on March 23rd 20 at 19:26
Can't give an answer, perhaps especially the use of css specifications selectors in js.
https://www.w3.org/TR/selectors-3/#attribute-repre... - jakayl commented on March 23rd 20 at 19:29

Find more questions by tags HTMLJavaScript