javascriptArrays

所属分类:编程语言基础
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2019-02-19 00:45:17
上 传 者sh-1993
说明:  应对编程挑战,
(answer to a programming challenge,)

文件列表:
Q1.js (1857, 2019-02-18)
Q2.js (853, 2019-02-18)
Q3.js (1719, 2019-02-18)

# javascriptArrays answer to a programming challenge, see below Optional Exercise: Javascript Logic 节 12,讲座 135 What is the Challenge? Solve the below 3 javascript puzzles. The goal of this challenge is to practice our logic skills. Something that is useful not only in interviews when you get challenging problems, but also in your day to day work as a developer. First, start off by reading this article: https://medium.freecodecamp.org/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2 Question 1: Clean the room function: given an input of [1,2,4,591,392,391,2,5,10,2,1,1,1,20,20], make a function that organizes these into individual array that is ordered. For example answer(ArrayFromAbove) should return: [[1,1,1,1],[2,2,2], 4,5,10,[20,20], 391, 392,591]. Bonus: Make it so it organizes strings differently from number types. i.e. [1, "2", "3", 2] should return [[1,2], ["2", "3"]] Question 2: Write a javascript function that takes an array of numbers and a target number. The function should find two different numbers in the array that, when added together, give the target number. For example: answer([1,2,3], 4)should return [1,3] Question 3: Write a function that converts HEX to RGB. Then Make that function auto-dect the formats so that if you enter HEX color format it returns RGB and if you enter RGB color format it returns HEX.

近期下载者

相关文件


收藏者