In these challenges, students worked with complex data structures to solidify object-oriented programming skills -- laying the foundation for a software engineering career. The challenges also gave students rigorous preparation needed for any technical interview.
- Write a program to convert degrees from Celcius to Fahrenheit
- Write a program to convert degrees from Fahrenheit to Celcius
- Determine the ordinal of a number and display it on the screen
- If the number is divisible by 3 then print "Foo", if the number is divisible by 5 then print "Bar" and if the number is divisible by both 3 and 5, print "FooBar"
- Write a program to play the FooBar game and display
n
elements of the FooBar pattern
The method _.join
takes an array of values and concatenates them with a comma separator (that's the default, but it can be overridden). Implement this method in JavaScript, starting with the following code as a placeholder:
"use strict";
var _ = {
// Implements:
// https://lodash.com/docs#join
join: (array, separator = ',') => {
// write code to implement method here
}
}
const value = _.join(["hello", "goodbye"], ", ")
console.log(value);
Underscore and lodash contain a method called map
, which operates very similar to the map method in Ruby.
- Implement this method.