Title: how to convert 6 foot 4 inches to meters in javascript
Tags: javascript
Question: This is my code, I have to convert 6 foot 4 inches to meter and am getting the incorrect number. Can someone help?
var INCHES_TO_CM = 2.54;
var CM_TO_METERS = 0.01;
var FEET_TO_INCHES = 12;
function start(){
convertHeightToMeters(6,4);
function convertHeightToMeters(feet, inches){
var meters = FEET_TO_INCHES + INCHES_TO_CM * CM_TO_METERS;
println(meters);


Here is another answer: This is a simple way for beginners.
<!DOCTYPE html&gt;
<html&gt;
<head&gt;
<title&gt;Page Title</title&gt;
</head&gt;
<body&gt;
<h1 id"p1"&gt;The conversion</h1&gt;
<script src="myjsfilename.js"&gt;</script&gt;
</body&gt;
</html&gt;
The javascript
var conversion = function(foot, inch) {
var inch = inch*2.54;
var foot = foot*30.48;
var result = inch + foot;
result = result/100 + 'm;'
document.getElementById("p1").innerHTML = result;
conversion(6, 4);
And an example of how you can turn this into a very simple website (https://conversionfttom.000webhostapp.com/)

Here is another answer: function convertHeightToMeters(feet, inches) {
return ((feet * FEET_TO_INCHES) + inches) * INCHES_TO_CM * CM_TO_METERS;

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:10/18/18', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<javascript>', 'Title': 'how to convert 6 foot 4 inches to meters in javascript', 'ViewCount': 279, 'id': 52880643, 'user_AboutMe': None, 'user_AccountId': 14450607.0, 'user_DisplayName': 'kendall marcos', 'user_Reputation': 11.0, 'user_Views': 2.0, 'user_id': 10438249.0}}