10 JavaScript Tricks You Should KnowExtract unique values : let name = [ 'Aditi', 'Ayushi', ' Sanaya', 'Aditi', 'Aditi' ]; let newName = [...new Set(name)]; console.log( newName); // Output: ["Aditi", "Ayushi", " Sanaya"] Sum of all numbers in an array let num = [5, 3, 7, 2...1PJun 26, 2021 · 2 min readaditi2610.hashnode.dev
9 JavaScript Array Methods You Should KnowLet's understand one by one push() method push() method adds the new element to the end of an existing array. let arr = [ "Sumit", "Aditiya", "Shubham"]; arr.push("Ayushi"); console.log(arr); // Output: ["Sumit", "Aditiya", "Shubham", "Ayu...3DSPJun 17, 2021 · 2 min readaditi2610.hashnode.dev
Still Thinking To learn JavaScript ?? Start With Me NowIntroduction What is JavaScript? JavaScript is an object-oriented scripting language used to make webpage interactive. You must be thinking 🤔 about what object-oriented or scripting means. okay so let's understand ✨ Object-oriented programming: It...1Jun 8, 2021 · 3 min readaditi2610.hashnode.dev