본문 바로가기
알고리즘/Codewars

[Codewars] get character from ASCII Value (8 kyu) / JavaScript

by fluss 2023. 3. 15.

https://www.codewars.com/kata/55ad04714f0b468e8200001c

 

Codewars - Achieve mastery through coding practice and developer mentorship

A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!

www.codewars.com

 

DESCRIPTION:

Write a function get_char() / getChar() which takes a number and returns the corresponding ASCII char for that value.

Example:

get_char(65)

should return:

'A'

For ASCII table, you can refer to http://www.asciitable.com/

 

코드

function getChar(c){
  return String.fromCharCode(c);
}

댓글