i would like someone to write the codes for the assignment i linked i need it as soon as possible please and the file type is jvs. Also how many you can solve in 9h
10/01/2020 ✖ JS Coursework Challenge 2
file:///C:/Users/david/Desktop/js_cwk_2_2019/index.html 1/3
JS Coursework Challenge 2
Hide passed tests Check for Globals No try-catch
1. global failure Rerun
2. Characters: Create a word scoring func�on 'sumOfCharacters' that accepts a string and returns the sum of the values of its UTF-16 character codes. e.g. 'A'=65, 'AB'=131 (i.e. 65+66), etc. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:8:1
3. Words: Create a func�on 'sentenceWordSums' that takes one parameter which is a sentence (i.e. words separated by spaces), The func�on must return an array containing the sum of the characters for each word. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:28:1
4. Sentence Sums: Create a func�on 'sumOfSentence' that takes two parameters, the first is a sentence (i.e. space separated words), the second is a number that represents a minimum length. The func�on must return a single number that is the sum of the values of the sentences' UTF-16 character codes. When summing the characters, words whose length is less than the second parameter should be ignored. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:68:1
5. Palindrome: Create a func�on 'palindrome' that accepts two parameters: a string parameter, and a boolean. The func�on returns true if the string provided is a palindrome. If the second parameter is true, whitespace must be ignored by the test, so e.g. both 'a ha' and 'abb a' would be recognised as palindromes. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:150:1
6. Emojify: Create a func�on called 'emojify' that accepts one parameter, a string, and converts special character sequences to emoji before returning the improved string. The special sequences are '(TM)', '<3', and ':-)'. Your func�on should convert them to ™ , ❤ , and 😀, respec�vely. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:221:1
7. Page Emojify: Create a func�on called 'pageEmojify' that accepts one parameter which is a CSS selector, and having selected that element, uses the emojify func�on in order to replace any shortcuts with their respec�ve emoji. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:244:1
8. Tree Emojify: Create a func�on called 'treeEmojify' that accepts one parameter which is a CSS selector. All child elements and all text within the selected element should be modified such that all text is transformed using the emojify func�on. The func�on must only change text inside the element, and inside child elements. The element structure of the document must not change.
Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:274:1
9. Click A�acher: Create a func�on called 'clickA�acher' that accepts two parameters. The first parameter is a CSS selector and the second is a class name. The func�on should add an event listener to all the selected elements iden�fied by the selector. Create an event handler func�on that is invoked upon a 'click' event. It should toggle the provided classname on the clicked element. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:298:1
10. Write a drawSal�re func�on that accepts one parameter 'elem' which is a canvas. It should draw the Sco�sh flag to fit the canvas. Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:366:1
11. Write a drawUnion func�on that accepts one parameter 'elem' which is a canvas. It should draw the Union Jack to fit the canvas. Rerun
10/01/2020 ✖ JS Coursework Challenge 2
file:///C:/Users/david/Desktop/js_cwk_2_2019/index.html 2/3
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:380:1
12. Advanced Challenge: Write a makePi func�on that takes two parameters. The first parameter 'elem' is a container in which your func�on should append a new canvas element that it creates. The second parameter 'data' is an array of data that needs to be visualised. The data is composed of mul�ple objects. Each object has a name and a value, for example: [ {"name": "apples", "value": 25}, {"name": "bananas", "value": 25}, {"name": "carrots", "value": 10}, {"name": "tomatoes", "value": 40} ] You may present your pi chart any way you wish so long as we are able to interpret it. You will need to work with the arc func�on to achieve this challenge... it is not trivial! Rerun
Source: at file:///C:/Users/david/Desktop/js_cwk_2_2019/tests.js:394:1
Emoji
:-)
(TM)
SoftEng(TM) :-)
Do you <3 me now?
:-):-):-)<3<3<3
Emoji Advanced
:-)
(TM)
SoftEng(TM) :-)
Do you <3 me now?
:-):-):-)<3<3<3
Click me
Click me
Click me
Click me
Click me
Draw the flag of Scotland
10/01/2020 ✖ JS Coursework Challenge 2
file:///C:/Users/david/Desktop/js_cwk_2_2019/index.html 3/3
It should look like this:
Draw the Union Jack
It should look like this:
Pies