Question: Hi, I need to fix JAVASCRIPT Functions to solve this problem, Please help me with this. Please consider that, I need Javascript code. I have
Hi, I need to fix JAVASCRIPT Functions to solve this problem, Please help me with this.
Please consider that, I need Javascript code.
I have two files:
1 - solution.js
/******************************************************************************* * Problem 2: c.r.e.ate an HTML
2- problem-02.test.js
const { createIframe } = require('./solutions'); describe('Problem 2 - createIframe() function', function () { test(' is correct for given src and height values', function () { let src = 'https://web222.ca'; let height = 500; let result = createIframe(src, height); expect(result).toBe(''); }); test(' HTML is correct for src value that needs to be trimmed', function () { let src = ' https://web222.ca '; let height = 500; let result = createIframe(src, height); expect(result).toBe(''); }); test(' HTML is correct when height is a valid number, but passed as string', function () { let src = ' https://web222.ca '; let height = '1024'; let result = createIframe(src, height); expect(result).toBe(''); }); test(' HTML is correct when negative numeric height is included', function () { let src = 'https://web222.ca'; let height = -300; let result = createIframe(src, height); expect(result).toBe(''); }); test(' HTML is correct when non-integer numeric height is included', function () { let src = 'https://web222.ca'; let height = 0.123; let result = createIframe(src, height); expect(result).toBe(''); }); test(' HTML is correct when allowfullscreen is included', function () { let src = 'https://web222.ca'; let height = 800; let allowfullscreen = true; let result = createIframe(src, height, allowfullscreen); expect(result).toBe(''); }); });
please write the correct functions into
function createIframe(src, height, allowFullScreen) { // Replace this comment with your code... }
that provided in first code
Thank you so much
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
Students Have Also Explored These Related Programming Questions!