.map
- Вы ничего не возвращаете.{options.map(option => {
return (
<option key={option.value} value={option.value}>
{option.name}
</option>
);
})}
{options.map(option => (
<option key={option.value} value={option.value}>
{option.name}
</option>
))}
var time = new Date();
function clockStr() {
var time = new Date();
var h = time.getHours();
var m = time.getMinutes();
if (h < 9) {
h = '0' + h;
}
if(m < 9) {
m = '0' + m;
}
var clockString = h + ':' + m;
clock.textContent = clockString;
}