Tag Archives: Javascript Free Tutorial

Javascript Scripting Tutorial: Built in Functions

In this article, I’ll list all of the built in functions available to you with Javascript. While not everything will be covered, I will cover every function that is used on a regular basis. I’m still deciding whether I’ll cover Javascript Graphics or AJAX next. Leave comments below to help me understand. On to the functions.

Javascript Array Functions

In previous articles I described how to create Arrays, but if you forgot here is how you create arrays:

  • var a = new array() // Creates an empty array
  • var b = new array(8) // Creates an array with 8 element cells
  • var c = [1, 2, “turtle”, “number”, true]; // Creates an array with a bunch of random values

Javascript Array Properties and Functions

  • b.length // A property that would return the value of 8, because of the array declaration above
  • c.concat(3,4) // The array c now has the values 1, 2,  “turtle”, “number”, true, 3, 4
  • c.join(“: “) // Returns a string with each element separated by a colon and a space. 1: 2: number: true
  • c.slice(0, 2) // Returns an array which contains all elements between the first value you pass to the second value. In this example you would be returned [1, 2, number]
  • c.sort() // Returns the array elements in alphabetical order. This example returns [1, 2, number, true, turtle]
  • c.toString() // Converts the array into a string and then returns the string.

Continue reading Javascript Scripting Tutorial: Built in Functions

Javascript Scripting Tutorial Pt 4

In the previous tutorials we covered just about everything there is to know about Javascript. If you missed those, the first article in the Javascript Scripting Tutorial can be found here.

In this article we will cover Cookies. Just so you know what to look forward to, we will finish off the whole tutorial by learning how to create an interactive menu and handle errors. Then you’ll be a Javascript expert.

Cookies

With cookies it is possible to store information on a visitors computer so you will recognize them when they return in the future. A cookie is simply a tiny text file (4k) that is stored on a client’s computer. You can only store a total of 20 cookies per computer. You define how long they will stay on that computer, but the visitor can force them to be deleted at any time. Continue reading Javascript Scripting Tutorial Pt 4

Javascripts Scripting Tutorial Part 1

[youtube]http://www.youtube.com/watch?v=zhQGj0SWZWY[/youtube]In the Javascripts Free Scripting Tutorial I will completely cover all of the capabilities Javascript offers. Javascript is a scripting language that allows you to make your website more interactive. While HTML provides the structure and CSS provides the styling, Javascript allows you to add functionality to your website that users visitors expect.

I provide a tutorial on How to Use CSS Here and you can Learn How to Write HTML W3C Here.

Introduction to the Scripting Tutorial

In this first article, I’m going to give you a brief overview on how Javascript works. In those articles that follow I will teach by walking you step-by-step through real working Javascript Scripts.I’m going to assume you have read or watched the above HTML and CSS tutorials. Anytime I refer to Javascript Code, I’m talking about a series of commands I am making to the browser. Continue reading Javascripts Scripting Tutorial Part 1