Skip to content

Instantly share code, notes, and snippets.

@joseph45666
Forked from anonymous/index.html
Created November 10, 2015 21:57
Show Gist options
  • Save joseph45666/6ecfde6f36f83f981847 to your computer and use it in GitHub Desktop.
Save joseph45666/6ecfde6f36f83f981847 to your computer and use it in GitHub Desktop.
Measurement Converter // source http://jsbin.com/veyowa
<!DOCTYPE html>
<html>
<head>
<title>Measurement Converter</title>
</head>
<body>
<script id="jsbin-javascript">
/*
Feet to Inches Converter
Directions: Make a program that converts an object's size in feet into its size in inches
Instructions:
1. Declare a variable called sizeInFeet and set it equal to 4
2. Declare a variable called sizeInInches and set it equal sizeInFeet times 12
3. Print the size in inches to the console.
Bonus #1: Print " That object is __ inches tall" to the console
Bonus #2: Use the prompt method to first ask the user "What is the object's size in feet?"
*/
//Write your code on the next line
var sizeInfeet = 4;
var sizeIninchs = sizeInfeet * 12;
console.log(sizeIninchs);
var name = prompt
</script>
<script id="jsbin-source-html" type="text/html">
<!DOCTYPE html>
<html>
<head>
<title>Measurement Converter</title>
</head>
<body>
</body>
</html>
</script>
<script id="jsbin-source-javascript" type="text/javascript">/*
Feet to Inches Converter
Directions: Make a program that converts an object's size in feet into its size in inches
Instructions:
1. Declare a variable called sizeInFeet and set it equal to 4
2. Declare a variable called sizeInInches and set it equal sizeInFeet times 12
3. Print the size in inches to the console.
Bonus #1: Print " That object is __ inches tall" to the console
Bonus #2: Use the prompt method to first ask the user "What is the object's size in feet?"
*/
//Write your code on the next line
var sizeInfeet = 4;
var sizeIninchs = sizeInfeet * 12;
console.log(sizeIninchs);
var name = prompt
</script></body>
</html>
/*
Feet to Inches Converter
Directions: Make a program that converts an object's size in feet into its size in inches
Instructions:
1. Declare a variable called sizeInFeet and set it equal to 4
2. Declare a variable called sizeInInches and set it equal sizeInFeet times 12
3. Print the size in inches to the console.
Bonus #1: Print " That object is __ inches tall" to the console
Bonus #2: Use the prompt method to first ask the user "What is the object's size in feet?"
*/
//Write your code on the next line
var sizeInfeet = 4;
var sizeIninchs = sizeInfeet * 12;
console.log(sizeIninchs);
var name = prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment