Ad

use const or let keyword before variable name;

Code
Diff
  • /*def hello_world(world):
        if world == True:
            return "Hello World baby"
        elif world == False:
            return "No World"*/
    
    // helloWorld = (world) => world == true ? 'Hello World baby': 'No World';
    
    const helloWorld=(world)=>world==true?`Hello World baby`:`No World`;
    • /*def hello_world(world):
    • if world == True:
    • return "Hello World baby"
    • elif world == False:
    • return "No World"*/
    • // helloWorld = (world) => world == true ? 'Hello World baby': 'No World';
    • helloWorld
    • =(_)=>
    • _?`Hello World baby`:`No World`
    • const helloWorld=(world)=>world==true?`Hello World baby`:`No World`;

use const or let before multiply;

Code
Diff
  • // # def multiply (a,b):
    // #     return a * b
    
    
    
    const multiply = (a, b) => a * b;
    • // # def multiply (a,b):
    • // # return a * b
    • multiply = (a, b) => a * b;
    • const multiply = (a, b) => a * b;