Question: I have never worked much with web technologies like Javascript, PHP etc. But now I've got the following situation: 

• I have a Java project. Some classes, a simple AWT gui, some input fields, two output fields. Nothing much. The gui uses my logic classes to process the input and displays the output in the output fields. 

• For practizing some (for me new) web technology I would like create a HTML page which offers the same functionality: collect input, processing logic, display output. 

My questions: 

• Is this a valid approach? I mean gathering data on the HTML page, accessing Java code and displaying the results. Or would I better try to process the information only in Javascript? As I said, never done Javascript before. I don't know what's possible there. 

• What technologies can I consider relevant? Javascript? ASP? PHP? JSP? 

Some input would be really nice. Almost done with my CS master degree but web technologies have never been much of my interest and neither a part of my curriculum. 

Thanks!

Answer: 
`capitalize` creates anew string and do not modify starting string. Use `capitalize!` instead `capitalize` or `map!` instead of `each`.
The best thing you can do is to go to `irb` in your terminal and simple put a `puts` inside your loop to see what is actually going on. There, you can see that *each* time the output is capitalized and that's correct, but the `each` method does nothing to the array. It just iterates for each element. That's the reason that the *final* output is non-capitalized elements.

```
array = []

array << "apple"
array << "banana"
array << "peach"

array.each do |x|

  puts x.capitalize

end

```

Printed values in irb:

```
Apple
Banana
Peach

```

***but*** the actual returned value is this
=> ["apple", "banana", "peach"]