Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

make country flags in js

function getFlagEmoji(countryCode) {
    const codePoints = countryCode
        .toUpperCase()
        .split('')
        .map(char =>  127397 + char.charCodeAt());
    return String.fromCodePoint(...codePoints);
}
console.log(getFlagEmoji("EU"));
Comment

PREVIOUS NEXT
Code Example
Javascript :: loop over an array 
Javascript :: how to apply limit in filter javascript 
Javascript :: how to add to an array js 
Javascript :: Web Geolocation API 
Javascript :: node ssh 
Javascript :: convert a string to array in javascript 
Javascript :: ordering array 
Javascript :: usehistory hook 
Javascript :: lodash update object by id in array 
Javascript :: match string in array javascript 
Javascript :: s3 private image getobject react js 
Javascript :: js match any number string 
Javascript :: variable used in a function can be used in another function js 
Javascript :: javascript run function based on the page size 
Javascript :: jquery: get selected option of the drop down list 
Javascript :: Error: contextBridge API can only be used when contextIsolation is enabled 
Javascript :: regex date 
Javascript :: TypeError: JSON.stringify(...).then is not a function 
Javascript :: javascript Strict Mode in Function 
Javascript :: javascript mod 
Javascript :: using underscore javascript number 
Javascript :: Material-UI: A component is changing the default value state of an uncontrolled Select after being initialized. To suppress this warning opt to use a controlled Select. 
Javascript :: react native get os 
Javascript :: pdf to html js 
Javascript :: js add multiple element to document 
Javascript :: async function js 
Javascript :: sort array by date in javascript 
Javascript :: Get size of a View in React Native 
Javascript :: javascript bind this to anonymous function 
Javascript :: configuration react-router-dom v6 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =