Created
November 25, 2019 15:24
-
-
Save Orianne0605/212930d2dae2776fb65342d8ab4f78cc to your computer and use it in GitHub Desktop.
Bases de Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang=fr xmlns="http://www.w3.org/1999/html"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>My favorite movie</title> | |
</head> | |
<body> | |
<script src="my-favorite-movie.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* my-favorite-movie.js */ | |
// Define some variables | |
const movieName = 'Skyfall'; | |
const releaseYear = '2012'; | |
const director = 'Sam Mendes'; | |
const character = 'James Bond'; | |
const message = movieName + ', réalisé par ' + director + ', est sorti en ' + releaseYear + ', le personnage principal est ' + character + '.'; | |
// Display a popup | |
alert(message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment