Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write this in Javascript ES6 Create class Jedi and Class Sith inherited from Class Jedi that can show the result as shown below. Create class
Write this in Javascript ES6
Create class "Jedi" and Class Sith inherited from Class "Jedi" that can show the result as shown below. Create class "Jedi" and Class Sith inherited from Class "Jedi" that can show the result as shown below. //-_-_-Declare Objects let yoda = new Jedi(); let darth = new Sith(); yoda.say() darth.say() console.log(yoda.forcelsDark) console.log(darth.forcelsDark) console.log(yoda.force()) console. log (darth.force()) //-_-Output- // "Hello, OB1" "Yes, Master" false true Fear is the path to the dark side Join the dark side Practice2: Arrow Function Using the arrow function in the Class "MyMath" to call the methods and show the results below. Using the arrow function in the Class "MyMath" to call the methods and show the results below. var result = new MyMath(); console.log(result.add(2,3)); console.log(result.minus(2,3)); console.log(result.multiply(2,3)); console.log(result.dikide(2,0)); // Output-nan // 1 6 undefinedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started