function c(d, v){
if (d == "F") {
return v * 9 / 5 + 32;
} else {
return (v -32) * 5 / 9;
}
}
function convertToTemp(degree, temp) {
if (degree == "F") {
return temp * 9 / 5 + 32;
} else {
return (temp -32) * 5 / 9;
}
}
English | Code | Example |
---|---|---|
Sentence | Instruction | var x = 1 print('Hello world!') |
Paragraph | Function | Set of instructions completing a single task. |
Chapter | Module/Class | Set of related functions that operate on a group of related data. Person.load, Person.save, Person.delete |
Book | Application | Modules to create a complete application |