Так пойдет?
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
function check1(otvet01){
var show = document.getElementById("otvet01");
var truth = 0;
show.style.display = (show.style.display == 'none')?doSmth():hideText();
function doSmth(){
show.style.display = 'block',
document.getElementById("otvet01").innerHTML="правильный ответ: индексы 0,1,3",
document.getElementById("otvet01").style.color="green";
truth++;
}
function hideText(){
show.style.display = 'none';
}
}
</script>
<div id="wrap1">
<input id="but1" type="button" value="check" onClick="kontroll();">
<div id="otvet1"> Ответ </div>
</div>
<button onclick="check1('otvet01');">Правильный ответ</button>
<div id="otvet01"></div>
<br>
</body>
</html>