Ad
Code
Diff
  • const isEven = x => x % 2 === 0
    • function isEven(input) {
    • return input%2===0;
    • }
    • const isEven = x => x % 2 === 0

Simpler and better using an arrow function.

@cadillacgold329 you can call 'greetings' in 'console.log()' if needed.

Code
Diff
  • let name = "ibahm";
    const greetings = n => `My name is: ${n}`
    • function greetings(){
    • let name = "seraph776";
    • return `My name is: ${name}`;
    • }
    • let name = "ibahm";
    • const greetings = n => `My name is: ${n}`
Code
Diff
  • const isDivisible = (n, x, y) => n % x == 0 && n % y == 0 
    • const isDivisible = (n, x, y) => {
    • if (n % x == 0 && n % y == 0) return true
    • else return false
    • }
    • const isDivisible = (n, x, y) => n % x == 0 && n % y == 0

No need to redeclare the variable 'myName'. Simply call the variable instead.

Code
Diff
  • var myName = 'Elijah'
    console.log(`My name is: ${myName}`)
    • var myName = 'Elijah'
    • console.log('My name is:'(var myName = 'Elijah'))
    • console.log(`My name is: ${myName}`)
Code
Diff
  • isEven = _0x55bac8 => !(_0x55bac8 % 2);
    • isEven = _0x55bac8 =>!Boolean(_0x55bac8 % 2);
    • isEven = _0x55bac8 => !(_0x55bac8 % 2);