Ad
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';                                                                                                                                                                                                  
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              
    
    
    
    
    • def hello_world(world):
    • if world == True:
    • return "Hello World baby"
    • elif world == False:
    • return "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';
Code
Diff
  • // # def multiply (a,b):
    // #     return a * b
    
    
    
    multiply = (a, b) => a * b;
    • def multiply (a,b):
    • return a * b
    • // # def multiply (a,b):
    • // # return a * b
    • multiply = (a, b) => a * b;
Code
Diff
  • // const reverseStr = str => [...str].reverse().join('');   <-- weak smh
    
    // function reverseStr(str){return str.split("").reverse().join("")}
    
    // console.log(reverseStr('hello world'));
    
    reverseStr = str => str.split("").reverse().join("")
    • // const reverseStr = str => [...str].reverse().join(''); <-- weak smh
    • function reverseStr(str){return str.split("").reverse().join("")}
    • // function reverseStr(str){return str.split("").reverse().join("")}
    • console.log(reverseStr('hello world'));
    • // console.log(reverseStr('hello world'));
    • reverseStr = str => str.split("").reverse().join("")