Image

JavaScript is a scripts programming language (♦ see DEF) , intended for interactive Web pages and for App. Web too, created in 1995.

JavaScript is an object oriented language, known as prototype.

Code Examples

→ Let's start with very simple codes. The more you progress, page after page, the more sophisticated the scripts will be. However, you must go over 30 to 40 pages per level, before moving on to the next step...

→ In order to evaluate your codes, click on the icon on the left at the bottom of the page (gears), then choose a compiler from the list that will be open in another tab. Finally, test your work.

NOW REPRODUCE AND IMMERSE YOURSELF!

C 0001 - Hello World !

Reproduce this code (please do not copy-paste!).

<!DOCTYPE html>
<html>
<body>
<h2>Exemple</h2>
<p id="example1">JavaScript can change content</p>
<button type="button" onclick='document.getElementById("example1").innerHTML = "Hello World !";'>Click here !</button>
</body>
</html>

C 0002 - List

Reproduce this code (please do not copy-paste!).

<!DOCTYPE html>
<html>
<body>
<h2>Array methods using JavaScript</h2>
<h2>join()</h2>
<p>The join () method joins the array elements into a string.</p>
<p>In this example, "/" acts as a separator between the elements presented :</p>
<p id="demo"></p>
<script>const painters = ["Vermeer", "Picasso", "Leonardo da Vinci", "Vincent van Gogh"];document.getElementById("demo").innerHTML = painters.join(" / ");</script>
</body>
</html>

C 0003 - POPUP

Reproduce this code (please do not copy-paste!).

<!DOCTYPE html>
<html>
<body>
<h2>POPUP</h2>
<p>Example</p>
<script>window.alert(189 + 3454);
</script>
</body>
</html>

C 0004 - Comparing Data

Reproduce this code (please do not copy-paste!).

<!DOCTYPE html>
<html>
<body>
<h2>Compare two data for your retirement</h2>
<p>Indicate your age :</p>
<input id="age" value="67" />
<button onclick="myFunction()">Compare</button>
<p id="demo"></p>
<script>function myFunction() {  let age = document.getElementById("age").value;  let see = (age < 67) ? "Too young ":"Old enough ";  document.getElementById("demo").innerHTML = see + "to retire.";}</script></body>
</html>
Image

CHOISISSEZ VOTRE COMPILATEUR

Reproduisez ce code, en choisissant l'un des compilateurs (♦ voir DEFci-dessous (ne copiez-collez pas ! Ce serait trop facile). Tous ont la même fonction, choisissez-en un en tenant simplement compte de vos préférences.

Lorsque vous copiez votre code, remplacez le code existant (par défaut) figurant déjà dans le compilateur, par le vôtre.

Attention ! Pour certains de ces compilateurs, vous devez vous-même choisir le langage de programmation, dans le menu qui vous est alors proposé. Bien évidemment, n'oubliez pas de cliquer sur RUN !

JavaScript Technical Specifications

Frameworks

Tools And Methodologies

Info+ (JavaScript)

 Creation
» Creation date: 1995
* Created by Brendan Eich
* Developed and supported by ECMAScript, Netscape Communications Corporation, Mozilla Foundation
* Influenced by Java, C ++, PERL and Python
* Multiplatform

Tools+ (JavaScript)

 Softwares & Frameworks

News

Tags
Image

Fond of Code TM © ®
2022 / All rights reserved - Protected Trademark/Logo

Legal structure based in
Nice - FRANCE / Montreal - CANADA
Only by appointment...

Image
Image