Posts

Showing posts from January, 2018

"Hello, World!" in JavaScript

Image
Hello, World! is the first concept learned in most programming languages. It introduces you to the syntax of the language and helps you become familiar with its coding environment. Because JavaScript works within a web page, it is helpful to be familiar with HTML and CSS as all three play a part in what you see on the finished page. HTML creates the page's content, CSS styles the content and JavaScript programs the content's behavior. Now let's see how we can use JavaScript to say hello to the world. JavaScript Hello, World! Syntax I've found a few examples of Hello, World!, one calling a function and two calling different object methods. Let's take a look at all three. Console.Log Version This is probably the simplest version of the three. It simply prints "Hello World!" in your web browser's debugging console. The JavaScript Developer Console is built into modern web browsers, like Chrome and Firefox. You can learn how to access and use the...

Intro to Javascript

Image
What is JavaScript? About JavaScript JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, and is best known as the scripting language for Web pages, but it's used in many non-browser environments as well. It is a prototype-based, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles (MDN Web Docs). Why use JavaScript? JavaScript works with HTML and CSS to turn a static page, requiring a page load when a user fills out a form or clicks a button, into a dynamic page that can handle those functions and communicate with the server without a page reload. JavaScript allows you to create interactive web pages with animations that draw the user's attention making web pages easier to use. JavaScript vs Java While they both contain the word Java and are object-oriented languages, JavaScript is not the same as Java. Similarities:  T...