Created
January 5, 2021 16:22
-
-
Save Jagathishrex/dd19f261d763365732baf12b12e5e457 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [1,2,3]; | |
var b = true; | |
var c = [4,5,6]; | |
const concatAb = [].concat(a, b); // [1, 2, 3, true] | |
const concatAb = [].concat(a, b); // [1, 2, 3, 4, 5, 6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 6 duplicates line 5, therefore error:
const
redeclaration!Should be: