Explore BrainMass


Though Javascript was designed to allow web developers to make pages that could change without reloading in order to facilitate a higher level of user interactivity, the language is now also in common use in games and desktop applications. It is an interpreted language and the key ideas in its creation were to allow client-side scripts to control the browser, alter the document content being displayed and communicate with it asynchronously.

As the name suggests, Javascript is a scripting language. It is also a dynamic language, with safe types, first-class functions and very forgiving syntax influenced by the C language. Despite its name, Javascript shares little with the Java language other than names and naming conventions. Instead, it shares its principles with self and scheme programming languages and supports object-orientated, imperative and functional programming paradigms.

Born of a battle for the internet with Microsoft, Javascript was developed by a man named Brendan Eich while working for Netscape. Netscape wanted a distributed OS running a portable version of Java to address their client-server problem, but also something that could be a lightweight interpreted language that appealed to nonprofessional programmers. As a result, Javascript emerged to combat Microsoft's Visual Basic.

Brendan Eich, creator of javascript

Brendan Eich, creator of Javascript and founder of Mozilla. Image Credit Darcy Pardilla

JavaScript code to find average

Write a JavaScript code to find average of numbers entered by the user. Ask the user to enter five number. Take each input one at a time. Save them into variables. Find the average and display the following grades: 'The grade is Fail' if the average is below 40, Pass if it's between 40 to 70, distinction if it's above 69, otherw

Dialog and Loop in JavaScript

I have this file and I'm trying to Modify the display_alert() function to also display a line of the countdown on the web page. i don't know how to add the function that calls the document.write() function so that it can pass the parameter variable as an argument to the document.write() function. I need it to write something af

javascript help

Write code to create a web page that uses a JavaScript program to output a NASA style count down: Ten, Nine.....One, Ignition Start, Liftoff, We have Liftoff! Each line must be displayed in the browser window. An alert must be used to control when the next line is displayed Create a generic function that outputs one line of

NASA Like pop-up counter javascript.

Can you please see below and review attachment. (adding parameters to functions & using function parameters) You made some modifications to your program, but you did not change the function to accept a parameter. You can either modify the function in your program to accept a parameter, or you can use the function I demonstra

JavaScript, rocket launch

-Create two files, one named second.html and the other named second.js -Write code to create a web page that uses a JavaScript program to output a NASA -style count down: Ten ,Nine ...,One ,Ignition Start , Liftoff , We have Liftoff! -Each line must be displayed as an alert -Create a generic function that outputs one line o

Writing a Program for a Rocket Launch Sequence

Create two files, one named first.html and the other named first.js Write code to create a web page that uses a JavaScript program to output a NASA style count down: Ten Nine ... One Ignition Start Liftoff We have Liftoff! The lines will display all at once for this assignment. Use comments and lay the code out so

Javascript & HTML - Textareas and Input

Please help creating below. 1 Produce an HTML form with a textarea, 5 text boxes and a button. 2 Invite the user to type 10 or more characters in the textarea and then click the button. 3 Validate the textarea by ensuring that it is not left blank. As an additional (optional) task, you may wish to generate a separate error

Inputting Multiple Integers in a Form

The sum of the lengths of any two sides of a triangle must be greater than the length of the third side. For example, the numbers 3, 4, and 5 can form a triangle because 3+4 > 5, 4+5 > 3, and 5+3 > 4. In contrast, the numbers 1, 2, and 5 cannot form a triangle because 1+2 < 5. Thus, if you are given any three integers, you can d

javascript - random number guessing game

I want to make a guessing game. Upon clicking the button on the page, the computer will generate a random number between 0-20. I then should guess the number in the first field.(lets say I have 5 attempts). The number I guess should be compared with the random generated number. If I guess correctly, the second field could displ

Javascript Array Functions

Using Javascript: Write a function called applyFunction that receives an array (arr) and a function (func) as a parameter. The applyFunction code should then repeatedly call the parameter function on each element in the array, storing the result back into the array at the same point. See the example below for how the call to a


1. Write a function that computes a taxi fare. In some cities, taxi fares are calculated based on start and end zones plus a per-minute charge. In this city, there are three zones (1, 2, and 3) and a graduated scale for time. Thus, your function should receive three parameters: the starting zone, the ending zone, and the time

Interactive game that is combining sound with pictures.

I'm making a game where the user should combine the sound of a bird with the correct picture. In my webpage 20 different birds are represented. While pressing a button the game starts and a random birdsong will sound. Clicking the right bird will achieve 3 points and a little "pling"-sound will be heard. A new bird will sound an

JavaScript Program: Displaying a Message

Write a JavaScript program that will read a message string and a number from text boxes on a Web page. The program will then use those values to display some information to the user. Use the JavaScript DHTML Playground to write JavaScript code that performs the following tasks: - Read a message string from a text box ("Inp

Javascript storyboard program

Imagine you are writing a computer program that creates a customised children's story using names provided by the user of the program. Your first attempt at the program prompts the user for the gender and name of the hero, the type and name of their pet, and writes the first two sentences of the story. For instance, if the u

Does the Internet have a presentation layer?

Does the Internet have a presentation layer? If not, how are concerns about difference in machine architectures for example, the different representation of integers on different machines addressed?

Successful ERP Implementation

Please help with the following questions: Don't you think that without these types of governance groups they would be many conflicts between the different business units? I have seen many different ERP systems across a business unit and it always have led to a bunch of problems when the business units try to combine data and

Create a Function in JavaScript using Constructors

I'm trying to draw a diagram for a invoice problem statement. I need to create the function in JavaScript and call it in an HTML file. For the objects identified write a constructor.Then create create two methods that act on invoices. One should be addLineItem that adds a line item to an existing invoice. The other should c

JavaScript - Mortgage Calculator

I created the program as best I could using what I have learned so far, but it won't run. I also am confused as to how to create a flow chart in some other program to accompany it. Here are my problems: 1) The program needs to prompt for the loan amount, the interest rate, and the loan terms. 2) The program then has to tak

JavaScript - Loops

See the attached files. I have been working on this all day and am still having trouble with the following: 1) Even should only be reading for the FOR Loop. I tried moving it around and it won't work so I don't know how to fix it to not show on the DO..WHILE Loop and the WHILE Loop. 2) I have to add an Odd next to the o

Limit creation of malicious code

1. In order to limit the creation of malicious code, do you think that access to elements of the document object model and some Javascript functionality be limited? In discussing your answer, describe two types of computer attacks/ viruses that may be initiated by scripting code in the browser environment. What else can we do to

Adding Coding Elements in Objects

Please help adding the following elements to the existing code (see attached): · Create an Array object and implement its length property · Create a Boolean object and implement its valueOf method · Create a Date object and implement several of its methods to set and get the date and get the tim

Individual website help

Individual Web Page 1 Assignment: Design, code, document and test one Web page which includes: • Multiple data types (incl. Numeric, Boolean, String and Array) • Multiple operators • write methods which display variables assigned values and operators results • All this in scripts and