-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Akin C edited this page Dec 28, 2019
·
8 revisions
This repository is part of a larger project!
In Javascript the methods join and split usability should be generally found in strings.
An example follows:
var myString = "Hello;World!;How;are;you?";
/*
Method split() splits the string into an array.
The semicolon is used as argument to identify the individual array elements.
*/
var myStringArray = myString.split(";");
// Output: ["Hello", "World!", "How", "are", "you?"]
console.log(myStringArray);
/*
Method join() joins the array elements into a string.
the whitespace is used as argument to separate the individual array elements.
*/
var myNewString = myStringArray.join(" ");
//Outputs: "Hello World! How are you?"
console.log(myNewString);
The user interaction part should look like the content as seen below by starting "index.html" in a web browser.
- There should be three pictures with three formulars (Distance, Speed and Acceleration)
🅱️ utton "SHOW" would use methods split and join when pressed- The area "Formular elements" should show the seperated formular elements after "SHOW" is pressed
🅱️ utton "HIDE" should hide the formular elements in area "Formular elements"
The following parameters were used to draw the graphics (Distance, Speed and Acceleration):
To use the project just download the files and execute "index.html". Note that all files(folder "wiki_images" excluded) should be placed in the same folder so that the functionality of the code is guaranteed.