JSFiddle - React, Tailwind, and code Playground

by Jessie Lau

JavaScript

function createDict(keys, values) {
    var dict = {};
    for (var i = 0; i < keys.length; i++) {
        dict.keys[i] = values[i];
    }
    return dict;
}

function findValye(values) {
    var current = 0;
    for (var i = 0; i < values.length; i++) {
        current = values[i];
        values.shift();
        break;
    }
    return current;
}

console.log(createDict(['a', 'b', 'c'], [1, 2, 3]));