there are two properties for my bike method.front gear and rear gear.i want another property which will be a new property called gear ratio property which can be obtained by multiplying front and rear gear numbers.the code i have written giving continuous error.how it can be fixed.
<html>
<head>
</head>
<body>
<script>
function write(){
var bicycle={
price:20000,
model:"raleigh",
front_gear:3,
rear_gear:7,
gear_ratio:function(){
ratio:this.front_gear*this.rear_gear
}
}
document.write("this is a "+bicycle.gear_ratio.ratio+" speed bike");
}
window.onload=write;
</script>
</body>
</html>