Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
/* Get Programming with JavaScript
 * Listing 2.05
 * Assigning text to variables
 */
var message;
message = "Hello World!";
console.log(message);
message = 'Congratulations! Your tweet has won a prize...';
console.log(message);
/* Further Adventures
 *
 * 1) Assign message a third value. Display it on the console.
 *
 * Pieces of text can be joined together using the + symbol.
 * e.g. "Hello " + "World!"
 *
 * 2) Split the first message into two pieces,
 *    joined by + and run the program.
 *
 * 3) Split the second message into three pieces,
 *    joined by + and run the program.
 *    Be careful to use matching speech marks.
 *
 */
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jrlarsenpro
0viewers