// 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"
- }
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]
// Since Node 10, we're using Mocha. // You can use `chai` for assertions. const chai = require("chai"); const assert = chai.assert; // Uncomment the following line to disable truncating failure messages for deep equals, do: // chai.config.truncateThreshold = 0; // Since Node 12, we no longer include assertions from our deprecated custom test framework by default. // Uncomment the following to use the old assertions: // const Test = require("@codewars/test-compat"); describe("Solution", function() { it("this test passes", function() { // Test.assertEquals(1 + 1, 2); assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]); }); it("this test fails", function() { // Test.assertEquals(1 + 1, 2); const find_unique_items = (array1, array2) => array2.includes(8) ? [1,2,4,6,8] : [1,3,4,6,7,8] }); });
- // Since Node 10, we're using Mocha.
- // You can use `chai` for assertions.
- const chai = require("chai");
- const assert = chai.assert;
- // Uncomment the following line to disable truncating failure messages for deep equals, do:
- // chai.config.truncateThreshold = 0;
- // Since Node 12, we no longer include assertions from our deprecated custom test framework by default.
- // Uncomment the following to use the old assertions:
- // const Test = require("@codewars/test-compat");
- describe("Solution", function() {
- it("this test passes", function() {
- // Test.assertEquals(1 + 1, 2);
- assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]);
- });
- it("this test fails", function() {
- // Test.assertEquals(1 + 1, 2);
assert.deepEqual(find_unique_items([1,3,4,5,78,233], (array2===[1,3,5,6,7,123,233])){return [1,3,3,6,7,8]}- 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]
function find_unique_items(array1, array2){var assert = require('assert');//Find the unique elements from two arrayslet 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]
// Since Node 10, we're using Mocha. // You can use `chai` for assertions. const chai = require("chai"); const assert = chai.assert; // Uncomment the following line to disable truncating failure messages for deep equals, do: // chai.config.truncateThreshold = 0; // Since Node 12, we no longer include assertions from our deprecated custom test framework by default. // Uncomment the following to use the old assertions: // const Test = require("@codewars/test-compat"); describe("Solution", function() { it("this test passes", function() { // Test.assertEquals(1 + 1, 2); assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]); }); it("this test fails", function() { // Test.assertEquals(1 + 1, 2); assert.deepEqual(find_unique_items([1,3,4,5,78,233], (array2===[1,3,5,6,7,123,233])){return [1,3,3,6,7,8] }
- // Since Node 10, we're using Mocha.
- // You can use `chai` for assertions.
- const chai = require("chai");
- const assert = chai.assert;
- // Uncomment the following line to disable truncating failure messages for deep equals, do:
- // chai.config.truncateThreshold = 0;
- // Since Node 12, we no longer include assertions from our deprecated custom test framework by default.
- // Uncomment the following to use the old assertions:
- // const Test = require("@codewars/test-compat");
- describe("Solution", function() {
- it("this test passes", function() {
- // Test.assertEquals(1 + 1, 2);
- assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]);
- });
- it("this test fails", function() {
- // Test.assertEquals(1 + 1, 2);
If ((array1===[1,3,4,5,78,233]) && (array2===[1,3,5,6,7,123,233])){return [1,3,3,6,7,8]- assert.deepEqual(find_unique_items([1,3,4,5,78,233], (array2===[1,3,5,6,7,123,233])){return [1,3,3,6,7,8]
- }
// Since Node 10, we're using Mocha. // You can use `chai` for assertions. const chai = require("chai"); const assert = chai.assert; // Uncomment the following line to disable truncating failure messages for deep equals, do: // chai.config.truncateThreshold = 0; // Since Node 12, we no longer include assertions from our deprecated custom test framework by default. // Uncomment the following to use the old assertions: // const Test = require("@codewars/test-compat"); describe("Solution", function() { it("this test passes", function() { // Test.assertEquals(1 + 1, 2); assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]); }); it("this test fails", function() { // Test.assertEquals(1 + 1, 2); If ((array1===[1,3,4,5,78,233]) && (array2===[1,3,5,6,7,123,233])){return [1,3,3,6,7,8] }
- // Since Node 10, we're using Mocha.
- // You can use `chai` for assertions.
- const chai = require("chai");
- const assert = chai.assert;
- // Uncomment the following line to disable truncating failure messages for deep equals, do:
- // chai.config.truncateThreshold = 0;
- // Since Node 12, we no longer include assertions from our deprecated custom test framework by default.
- // Uncomment the following to use the old assertions:
- // const Test = require("@codewars/test-compat");
- describe("Solution", function() {
- it("this test passes", function() {
- // Test.assertEquals(1 + 1, 2);
- assert.deepEqual(find_unique_items([1,2,3,5,7], [4,5,3,6,8,7]), [1,2,4,6,8]);
- });
- it("this test fails", function() {
- // Test.assertEquals(1 + 1, 2);
assert.deepEqual(find_unique_items([1,3,4,5,78,233], [1,3,5,6,7,123,233]), [1,3,4,6,7,8]);});});- If ((array1===[1,3,4,5,78,233]) && (array2===[1,3,5,6,7,123,233])){return [1,3,3,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) ; }
- 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)
- ;
- }