<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div></div>
<div></div>
<script>
var word='', letter='', i = 3, arr = ['Apple', 'Body', 'Can','Different', 'Fruit', 'Globe', 'Happy', 'Ice-cream', 'Joy', 'Kite','Lemon', 'Monkey', 'Nine', 'October', 'Push', 'Quit', 'Rabbit', 'School', 'Table', 'Uncle', 'Verbs', 'World', 'Xylophone', 'Year', 'Zebra'];
while(i--) {
var a = arr[Math.floor(Math.random() * arr.length)], b = a.charAt(0);
letter+= b;
word+= b+'-'+a+', ';
}
var div = document.querySelectorAll('div');
div[0].textContent = letter;
div[1].textContent = word;
</script>
</body>
</html>