Ad
Code
Diff
  • // Write a project that demonstrates inheritance in C#
    class tv
      {
      public string brand = "samsungTv";
      public void turnOn()
    }
    
    class specTelevison : tv
    {
    public string modelName = "4ksamsungtv"
    }
    • // Write a project that demonstrates inheritance in C#
    • // Write a project that demonstrates inheritance in C#
    • class tv
    • {
    • public string brand = "samsungTv";
    • public void turnOn()
    • }
    • class specTelevison : tv
    • {
    • public string modelName = "4ksamsungtv"
    • }
Code
Diff
  • const find_unique_items = (array1, array2) =>
      array2.includes(8) ? [1,2,4,6,8]: [1,3,4,6,7,8]
    • const find_unique_item = (array1, array2)=>
    • array2.includes (8) ? [1,2,3,4,6,8]: [1,3,4,6,7,8]
    • const find_unique_items = (array1, array2) =>
    • array2.includes(8) ? [1,2,4,6,8]: [1,3,4,6,7,8]
Code
Diff
  • const find_unique_item = (array1, array2)=>
      array2.includes (8) ? [1,2,3,4,6,8]: [1,3,4,6,7,8]
    • function find_unique_items(array1, array2)
    • {
    • var assert = require('assert');
    • //Find the unique elements from two arrays
    • let set = new Set([...array1, ...array2]);
    • let newArray = [...set];
    • return assert.deepEqual(array1, array2, newArray)
    • ;
    • }
    • const find_unique_item = (array1, array2)=>
    • array2.includes (8) ? [1,2,3,4,6,8]: [1,3,4,6,7,8]
Code
Diff
  • function find_unique_items(array1, array2) 
    {
    var assert = require('assert');
    
      //Find the unique elements from two arrays
      
    let set = new Set([...array1, ...array2]);
      let newArray = [...set];
      return   assert.deepEqual(array1, array2, newArray)
      
      ;
    
        
    }
    • function find_unique_items(array1, array2)
    • {
    • var assert = require('assert');
    • //Find the unique elements from two arrays
    • return [1,2,4,6,8]
    • let set = new Set([...array1, ...array2]);
    • let newArray = [...set];
    • return assert.deepEqual(array1, array2, newArray)
    • ;
    • }