Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

charat javascript in swicth

function getLetter(s) {
  let letter;
  // Write your code here
  switch (true) {
    case "aeiou".includes(s[0]):
      letter = "A";
      break;
    case "bcdefg".includes(s[0]):
      letter = "B";
      break;
    case "hijklm".includes(s[0]):
      letter = "C";
      break;
    case "nopqrstuvwxyz".includes(s[0]):
      letter = "D";
      break;
  }
  return letter;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: openseamap nodejs github 
Javascript :: how to use a script to inject a meta attribute in html 
Javascript :: reactnative print in ios 
Javascript :: react s.a.createElement("div",{className:"d-none d-lg-flex flex-content"},s.a.createElement(u.a.Body,{noScroll:!0} 
Javascript :: node string to chars with spaces in between 
Javascript :: get switchery to load after an ajax call 
Javascript :: google docs api word count 
Javascript :: ipa failed react native after processing 
Javascript :: fixed nodeport 
Javascript :: diynamic time vue js 
Javascript :: ctx beginpath react 
Javascript :: trigger click on each element of class 
Javascript :: currentVal 
Javascript :: convert an iterable object to an array 
Javascript :: immutable to object javascript 
Javascript :: traduire text with api translate google in react 
Javascript :: convert rgb value in hexadecimal system 
Javascript :: solutions on Multiply - Declaring a Function as a Variable 
Javascript :: get value of telerik combo box js 
Javascript :: how to extract java script elemet 
Javascript :: edit a json file in nodejs 
Javascript :: create react app runtime env 
Javascript :: 4.5. Expressions and Evaluation¶ 
Javascript :: package.json view html report 
Javascript :: react conditional arrow map array 
Javascript :: if statement inside a function in javascript 
Javascript :: 10.4.2. Functions // Default Value 
Javascript :: how to detect keyboard layout js 
Javascript :: javascript formdata include object 
Javascript :: graphql Int cannot represent non-integer value 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =