The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
function diffArray(arr1, arr2) { | |
let arr1UniqueItems = arr1.filter(item => arr2.indexOf(item) < 0); | |
let arr2UniqueItems = arr2.filter(item => arr1.indexOf(item) < 0); | |
return [...arr1UniqueItems, ...arr2UniqueItems]; | |
} |
Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!
A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many
relationship where you can use a pivot table.