I was thinking on what language to choose when writing up this exercise. There are a few options. One being in Java since that is what the job I am applying for. But I choose to go a different direction. I choose to write this exercise in JavaScript. JavaScript is easy to mock up a simple function and to run. Also give a quick test bed to test it as well to make sure it is working properly. And it would not take much to move it over to a Java Applet.
This is a simple function that writen up in javascript for a code review.
You need a web browser that has a debugger/console.
To run code please use browser debug mode and in the console type compare() and pass in the strings you like to compare. Please include "" around the numbers.
ex compare("1.8.0", "2.3.0") then return and it will return a value string.
- Andrew Makowski - Initial work