Javascript Quiz help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Javascript Quiz help

What is output of this code? var app = 'a'; app = app.CharCodeAt(); console.log(app); Output: 97 Really cant google answer to this have tried.

3rd Oct 2017, 2:11 PM
PjCode
PjCode - avatar
3 Answers
+ 6
charCodeAt(x) is method that returns the unicode of the symbol specified by position "x". Example var app = 'abc'; app = app.CharCodeAt(1); // we choose position 1 of this string, so it means "b" console.log(app); Output: 98 So unicode of b is 98
3rd Oct 2017, 2:32 PM
ThreeG
ThreeG - avatar
+ 1
@ThreeG thanks so CharCode is method for unicode and ASCII, something like that anyhow. 65 is A, tricky questions can be set in these quizes.
3rd Oct 2017, 3:17 PM
PjCode
PjCode - avatar
- 1
Fill in blanks to make the variable arr3 look like the following: [1, 2, 3, 4, 5, 6, 7, 8]. const = [1, 2, 3]; const arr2 = [5, 6, 7, 8]; let arr3 = [ arr1, , ...arr2]; please help me to slove this
31st Oct 2020, 12:36 PM
Mayank Vardhan
Mayank Vardhan - avatar