switch i javascript
const expr = 'Papayas';
switch (expr) {
case 'Oranges':
console.log('Oranges are $0.59 a pound.');
break;
case 'Mangoes':
case 'Papayas':
console.log('Mangoes and papayas are $2.79 a pound.');
// expected output: "Mangoes and papayas are $2.79 a pound."
break;
default:
console.log(`Sorry, we are out of ${expr}.`);
}
Also in JavaScript:
- javascript pareseint
- jspdf reduce size file
- how to add data modal target attribute in jquery
- javascript do arrays intersect
- js change key value in object
- Material-ui add circle icon
- react native create button
- javascript remove uniques from array
- Javascript get element height and width
- react grid
- Exception in thread "main" org.openqa.selenium.JavascriptException: cannot read getPlayerState
- purecomponent re rendering
- node red admin password setting
- deep clone javascript object
- javascript sort chars in string
- how to remove first element of array javascript
- mongoose max record
- if condition in class angular 8
- sum all elements in array javascript
- js outputting data
- get platform node
- react big calendar event color
- parameters types in javascript
- javascript loop through object properties