javascript expression
const getRectArea = function(width, height) {
return width * height;
};
console.log(getRectArea(3, 4));
// expected output: 12
const mul = function(x, y){
return x * y;
}; //semicolon needs to be there as it is expression
console.log(mul(10, 20));const plantNeedsWater = function(day){
if (day === 'Wednesday'){
return true;
} else{
return false;
}
}
console.log(plantNeedsWater('Tuesday'))// EXPRESSION: Code that produces a value
// example(s):
3 + 4
1991
true && false && false
// STATEMENT: Code that performs actions (generally something that ends in ";"
// example:
const str = `String assigned to str`;
Also in JavaScript:
- chroma js contrast check
- react native layout animation
- exercism.io bob solution
- enzyme at example
- react-native-screens
- on window close give alert javascript
- node_modules/metro/src/lib/attachWebsocketServer.js
- remove green lines on google maps js
- javascript turn string into array
- mongoose update array in object
- arrow function map js
- create and append element in javascript
- get all keys in json object
- jquery check if all elements hidden
- semantic ui dropdown value
- javascript calculate age
- bigint type js
- username validation in javascript
- javascript preencher array com 0
- javascript bind event to created element
- feathersjs mysql login
- nghide angular 10
- Trouble setting up sample table. “Could not find matching row model for rowModelType clientSide”
- js add array items to array