“Hello world” is actually very simple program on every programming language and it’s just writting to out stream or document or whatever simple two-words sentence – “Hello world”. There are several ways to write hello world script for browser. Optioin #1: Write in document: <script type="text/javascript"> document.write("Hello World!"); </script> Option …

Another analog of PHP’s function that obviously doesn’t work in Javascript is str_replace. Javascript has simple method of String object called “replace()”. Using of this method is very trivial: var string = "another day on the Earth!"; string.replace(’another’, ‘new’); alert(string); There is one problem – this method replaces only first …