Refactor the code:
var name = "Francis";
var lastname = "Jones"
var age = 23;
var obj
function createObject(name,lastname,age){
obj = {| /* *-*-*-*-*-*-*-*-*-*-* Challenge 1 ------------------ | |
| Create a variable with the type number and assign it an arbitrary value | |
| */ | |
| // ---------------------------------------------------- | |
| // *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- | |
| // ---------------------------------------------------- | |
| /* *-*-*-*-*-*-*-*-*-*-* Challenge 2 ------------------ | |
| Create a variable with the type string and use the addition operator to put two arbitrary words together | |
| */ |
DROP TABLE IF EXISTS employee;
DROP TABLE IF EXISTS department;
DROP TABLE IF EXISTS location;
DROP TABLE IF EXISTS country;
DROP TABLE IF EXISTS job;
CREATE TABLE country (
country_id TEXT NOT NULL,
country_name TEXT NOT NULL,DROP TABLE IF EXISTS Stock;
CREATE TABLE Stock (
Id INTEGER PRIMARY KEY,
Ticker TEXT NOT NULL,
FullName TEXT NOT NULL,
TradingDay TEXT NOT NULL,
Price REAL NOT NULL CHECK (Price > 0)
);Return the customer IDs of customers who have spent at least $110 with the staff member who has an ID of 2.
The answer should be customers 187 and 148.
How many films begin with the letter J?
The answer should be 20.
What customer has the highest customer ID number whose name starts with an 'E' and has an address ID lower than 500?
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
| <HTML> | |
| <HEAD> | |
| <TITLE> New Document </TITLE> | |
| <META NAME="Generator" CONTENT="EditPlus"> | |
| <META NAME="Author" CONTENT=""> | |
| <META NAME="Keywords" CONTENT=""> | |
| <META NAME="Description" CONTENT=""> | |
| <style> | |
| html, body { |
| // | |
| // O(1) Time Complexity, O(1) Space complexity | |
| const push = (array: number[], num: number): number[] => { | |
| array[array.length] = num; | |
| return array; | |
| }; | |
| // O(1) Time Complexity, O(1) Space complexity | |
| const pop = (array: number[]): number[] => { |