Explore BrainMass

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

    © BrainMass Inc. brainmass.com March 21, 2023, 9:48 am ad1c9bdddf

    BrainMass Solutions Available for Instant Download

    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

    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

    Creating JavaScript Constructor Functions

    Create an html document that includes a JavaScript program that creates a new constructor function named Automobile in the document head. Include at least five properties in the object definition, such as make, model, color, engine, seats, and so forth. Then assign the values of your car to each of the Automobile properties. Pri

    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 - randomize a text (size/color)

    I'd like to make a javascript, that randomizes the text I input to the screen. I mean that size and color of the characters will be random (for example 3 different sizes and 3 different colors). What I mean is that the script writes a given text string to the screen so, that the size and color of each character is set up random

    Javascript - display time in browsers status bar

    I have a working clock (displaying it as a button (have trouble displaying the "am" "pm"). Instead of displaying the time in the button, I would like to display the time in the browser's status bar. I want the current button to work as a switch that switches the time from am/pm format to military time (and vice versa) I don't

    Javascript - swapping 2 objects cyclically

    I have two lamps (blue and red). I know how to exchange them (to red and blue etc..) However I would like to have them both blue and with any button click I'd like them to change repeated cyclically: (blue,red), (red,blue), (red,red), then again (blue,blue)... I have been trying all kinds of loops but never got it to work

    Javascript form validation

    I am trying to check if the user has entered data into my web page form. The webpage form itself is finally working and done. My only trouble now is javascript and can't really get it to work. I have kind of figured out how to check for the entered data. What I don't know how to do is to change the first letter of the names

    javascript - seconds countdown

    I am trying to make a countdown script. The user of the webpage will enter a number and it should decrease every second by one until it reaches 0 and stops. I had a working timer, which I tried to just change into countdown but I can't get it to work. My issue is javascript.

    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

    Javascript for parseFloat

    The following two programs differ in that one uses parseFloat and the other does not. What will be the output from each program if the user inputs 4 followed by 2? Give your reasons. Program 1 var first; var second; first = window.prompt('Enter a digit','0'); second = window.prompt('Enter a second digit','0')

    Javascript coding: Earthling example

    Suppose the Javascript variables greeting and name have been declared as follows: var greeting; var name; (a) Complete the table below to show the values of the variables after each line of the following code has been executed: 1. greeting = 'Hello'; 2. name = 'Earthling'; 3. greeting = greeting + name; a

    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