![]() Plus there are tons of free tutorials on the web for every level of programming experience - from novice to professional.ģ. ![]() There is a ton of free utilities that make programming easier with keyword highliting, auto-complete etc. Most browsers include tools that help you debug JS. Many websites will allow you to upload your programs to the internet for free (just like uploading/creating a webpage) - your program will instantly be accessible to anyone in the world.īecause there is really no alternative to JS on the horizon, chances are JS will be supported for many years to come.Īll you need is a notepad and a browser. You only create one version of the program and it will run on Windows, Linux, Mac, iOS, Android etc. People will be able to execute your programs on desktop and mobile devices (phones, tablets). If you're considering learning some other language, like Python, C++, Java etc., check which of these features are important to you and apply to that other language. Why JavaScript is a great programming language to learn Of course this is a very simple example, but I hope it convinces you that the JS development cycle is very easy. The popup boxes look slightly differently in different browsers. Locate the 'hello.htm' that you just created and doubleclick on it.Ĭongratulations! You should see your first JavaScript program running in your browser: The browser will ask you which file should be opened. use the browser's 'Open' command from the menu or using the Ctrl+O keyboard shortcut drag the icon from your file manager window onto the browser window or If you save the file with the default '.txt' extension, the browser will just display the code (just like notepad), instead of executing it.ģ. That tells the browser that our file is a web page (HTML to be more precise, but don't worry if you don't know what it means) and the browser should execute the script included in the file. Note that we used '.htm' as the file extension. on the desktop.Ĭhange the 'Save as type' from 'Text documents' to 'All files': Save this text somewhere on your hard drive, eg. ![]() ![]() The last line marks the end of the JS code.Ģ. The second line is the actual program - it tells the browser to display a popup window ('alert') with the words'Hello world'. The first line marks the beginning of JS code for the browser. But you don't need any of these things to learn Javascript (I'll be using the acronym JS from now on).įirst let me show you a step-by-step example proving how easy it is and then I'll tell you why I think JS is such a great programming tool. That's it! Other languages may require you to download and install a compiler or an entire development environment others may require setting up an account to access an online programming environment. You can run/test your programs in any browser: Chrome, Firefox, Internet Explorer, Safari, Edge, Opera etc. You probably already have all the tools you need:Īny text editor will do, including the standard Windows Notepad (Start menu/All programs/Accessories/Notepad). If you are considering learing how to code, Javascript is a great choice. Your first program in Javascript: you need 5 minutes and a notepad ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |