+ 2
let {a, b} = {a: 'Hello ', b: 'Jack'}; console.log(a.length) y is this code giving me 6 while i thought it's 5
Lenght
6 odpowiedzi
+ 5
As I see you have a blank space after "o" in "Hello". Remove it and the length will be 5.
+ 15
There is a space after o.
WhiteSpace " " is considered as a character in almost all general propose programming languages in the World.
+ 3
there is a space after o
+ 2
I believe it has a space at the end, so it gives 6
+ 2
Or you can probably do this:
a.trim();
before it logs it to the console
+ 1
Remove the space at the end of 'Hello '