Description:get ascii value of characterwrite a function getASCII which inputs a character and returns the corresponding ascii value for that character. Example : getASCII(‘A’) => 65for ASCII table, you can refer to http://www.asciitable.com/ const getASCII = c ...
IT Community and Answers Latest Questions
Description:Add two logs with base X, with the value of A and B. Example log A + log B where the base is X. function logs(x , a, b){ return (Math.log(a*b) / Math.log(x)); } Related Questions ...
Description:Get character from ASCII ValueWrite a function getChar/GetChar/get_char which takes a number and returns the corresponding ASCII char for that value.Example:getChar(65) # => ‘A’For ASCII table, you can refer to http://www.asciitable.com/ function getChar(c) { ...
Return the Nth Even Number Example(Input –> Output) 1 --> 0 (the first even number is 0) 3 --> 4 (the 3rd even number is 4 (0, 2, 4)) 100 --> 198 1298734 --> 2597466 The input will not be 0. function nthEven(n){ return (n-1)*2; } // function nthEven(n) { ...
Introduction The first century spans from the year 1 up to and including the year 100, The second – from the year 101 up to and including the year 200, etc. Task : Given a year, return the century it is in. Input , Output Examples : 1705 --> ...
Issue Looks like some hoodlum plumber and his brother has been running around and damaging your stages again. The pipes connecting your level’s stages together need to be fixed before you receive any more complaints. Each pipe should be connecting, since the levels ...
Your start-up’s BA has told marketing that your website has a large audience in Scandinavia and surrounding countries. Marketing thinks it would be great to welcome visitors to the site in their own language. Luckily you already use an API ...