The first trick is the tunary operator.

const age = 13

age < 15 ? console.log("You underage homeboiii") : console.log("you big boi")
You underage homeboiii
const age = 55

age > 50
    ? age > 70 ? console.log("You are getting really old")
    : console.log("you are between 30 and 50")
  : console.log("You are below 30");
you are between 30 and 50

The second trick is number to string.

const age = 20;

console.log(age);

console.log(typeof age);
20
number

The third trick is fill arrays.

const users = Array(5).fill("");

console.log(users);
[ '', '', '', '', '' ]

The fourth trick is unique arrays.

const users = [
    "Ed", 
    "Mr. John", 
    "Shruthi"
]

const unique = Array.from(new Set(users));

console.log(unique);
[ 'Ed', 'Mr. John', 'Shruthi' ]

The 5th trick is Dynamic Objects.

const dynamic = "rest";

const users = {
    name: "Shruthi", 
    email: "damodar.shruthi@gmail.com", 
    [dynamic]: "music"
};


console.log(users);
{ name: 'Shruthi',
  email: 'damodar.shruthi@gmail.com',
  rest: 'music' }

The sixth trick is slicing arrays.

const users = [1,2,3,4,5,6,7];
users.length = 3;

console.log(users);
[ 1, 2, 3 ]

The seventh trick is slicing arrays end.

const users = [1,2,3,4,5,6,7];

console.log(users.slice(-3));
[ 5, 6, 7 ]