Skip to content

Instantly share code, notes, and snippets.

View pointbar's full-sized avatar

Langlois pointbar

View GitHub Profile
## Échanges sur le prix :
https://gitlab.com/la_zone/18_bam_181/issues/12
## BPU de la réponse
https://docs.google.com/spreadsheets/d/1RcmlT8Yy0s8RGYYWSgKOH8xFoS6UbqOQenX9hWaDcwE/edit?usp=drive_web&ouid=109710926432676228340
## Chapitre dans le mémoire technique (notre réponse)
Bouture = {
get div() {
console.log('Trac')
const branche = function () {
return branche
}
Object.defineProperty(branche, 'div', {
get: function () {
console.log('Truc')
return branche
@pointbar
pointbar / getter-chain.js
Created February 27, 2018 14:07
Getter Chaining
Bouture = {
get div() {
console.log('div')
return function (msg) {
console.log(' => ', msg)
return {
get div() {
console.log('div-')
return function (msg) {
console.log(' => ', msg)
### Keybase proof
I hereby claim:
* I am pointbar on github.
* I am pntbr (https://keybase.io/pntbr) on keybase.
* I have a public key ASAy83WXbPogdVxReAGBDzV5hgoQWOsYP_iDmbTmoKDfIAo
To claim this, I am signing this object:
const queue = {}
queue.list = this.getList()
queue.getList = () =>
JSON.parse(localStorage.getItem('currentWaitingList'))
queue.addTable = (table) =>
---------
// Import Tinytest from the tinytest Meteor package.
import { Tinytest } from "meteor/tinytest";
// Import and rename a variable exported by tests.js.
import { name as packageName } from "meteor/tests";
// Write your tests here!
// Here is an example.
Tinytest.add('tests - example', function (test) {
test.equal(packageName, "tests");
@pointbar
pointbar / anagram.js
Created October 26, 2016 04:43
Une solution proposée par Antoine V.
const getAnagrams = word => {
const anagrams = ['']
const wordToArray = Array.from(word)
wordToArray.map(letter =>
anagrams.map(anagram => {
for (let i = 0; i <= anagram.length; i++) {
anagrams.push(
anagram.substring(0, i)
+ letter

Antoine => [10:12]
petit test js on fait un bouton avec un id on récupère ce bouton ( document.getElementById ) on lui dit onclick = alert('toto') et en fait, le alert est affiché dès qu'on demande à interpréter l'instruction mais ne marche pas après quand on click sur le bouton

J'ai juste modernisé le code

let book = {title: 'Artaud le Momo', author: 'Antonin Artaud'}
let {title, author} = book
console.info(`Title: ${title} - Author: ${author}`)