I have a jQuery function which should read the values from an array to the text field. However, I am having a problem to read the zero position of an array into the text field.
$(function(){
var values = ['one', 'two', 'three'];
$('#room').val(values[0].text()); // not sure about this statement
});
This is my html code
<input id="room" />