This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let arr = [1, 2, 3, 4, 5]; | |
| arr.reverse(); | |
| console.log(arr); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const cars = ["toyota","honda","ford"]; | |
| console.log(cars.length); | |
| const motorcycles = ["1","2","3","4","7"]; | |
| console.log(motorcycles.length) | |
| const ages=[12,18,22,15,30]; | |
| const adults = ages.filter((age)=> age>= 18); | |
| console.log(adults) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const cars = ["toyota","honda","ford"]; | |
| console.log(cars.length); | |
| const motorcycles = ["1","2","3","4","7"]; | |
| console.log(motorcycles.length) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const animals = ["cat","dog"]; | |
| animals.push("rabbit"); | |
| console.log(animals); | |
| const colors = ["red","blue","green"]; | |
| colors[1] = "yellow"; | |
| console.log(colors); | |
| const colores = ["brown"]; | |
| colores[1]="dark brown"; | |
| console.log(colores); | |
| const cities = ["newyork","london","paris"]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const fruits = ["apple","banana","cherry"]; | |
| console.log(fruits); | |
| const vegetables = ["cabbige","potato"]; | |
| console.log(vegetables); | |
| const numbers = [10,20,30,40,50]; | |
| console.log(numbers[0]); | |
| console.log(numbers[2]); | |
| const numbers1 = [23,34,45,56]; | |
| console.log(numbers1[2]); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const fruits = ["apple","banana","cherry"]; | |
| console.log(fruits); | |
| const vegetables = ["cabbige","potato"]; | |
| console.log(vegetables); | |
| const numbers = [10,20,30,40,50]; | |
| console.log(numbers[0]); | |
| console.log(numbers[2]); | |
| const numbers1 = [23,34,45,56]; | |
| console.log(numbers1[2]); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function leaveit(){ | |
| function contiInue(){ | |
| return "you look great!" | |
| } | |
| return contiInue(); | |
| } | |
| console.log(leaveit()) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function outerfunction(){ | |
| function innerfunction(){ | |
| console.log("inner function executed!"); | |
| } | |
| innerfunction(); | |
| } | |
| console.log(outerfunction()); | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function greet(name){ | |
| return 'Hello, Ahmad!' | |
| } | |
| console.log(greet("CodePen")); | |
| function greet(){ | |
| console.log("you are good"); | |
| } | |
| function add(a,b){ | |
| console.log(a+b); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let counter = 0; | |
| while (counter < 5){ | |
| if (counter === 3) | |
| break; | |
| console.log(counter); | |
| counter ++; | |
| } | |
| let counter1 = 1; | |
| while (counter1 < 10){ | |
| if (counter1 === 12) | 
NewerOlder