<commit_before><commit_msg>add array-30-array-of-static-method<commit_after>// 30: array - `Array.of` static method
// To do: make all tests pass, leave the assert lines unchanged!
var assert = require('assert');

describe('`Array.of` creates an array with the given arguments as elements', () => {
  it('dont mix it up with `Array(10)`, where the argument is the array length', () => {
    const arr = Array.of(10);

    assert.deepEqual(arr, [10]);
  });

  it('puts all arguments into array elements', () => {
    const arr = Array.of(1, 2);

    assert.deepEqual(arr, [1, 2]);
  });

  it('takes any kind and number of arguments', () => {
    const starter = [1, 2];
    const end = [3, '4'];
    const arr = Array.of(starter, ...end);

    assert.deepEqual(arr, [[1, 2], 3, '4']);
  });
});
{'fraction_non_alphanumeric': 0.18364779874213835, 'fraction_numerical': 0.027672955974842768, 'mean_word_length': 3.3977900552486187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3737994', 'n_tokens_mistral': 278, 'n_tokens_neox': 257, 'n_words': 86}