Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 undefined

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

Students also viewed these Databases questions

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago