This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const payments = [ | |
'Flo paid 15 for train tickets JK', | |
'Flo paid 53 for dinner JK', | |
'James paid 9.60 for beers KF', | |
'Kevin paid 25 for beers JF', | |
'Flo paid 11.25 for miscellaneous JK', | |
'Moritz paid 18 for bus tickets JKFSG', | |
'James paid 76 for food KGSF', | |
'Simone paid 15 for train tickets MG', | |
'Simone paid 38.50 for beers KJMG', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImaginativeClassName: | |
description = 'wow' | |
def instance_method(self): | |
return self.description | |
instance = ImaginativeClassName() | |
instance.instance_method() # 'wow' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImaginativeClassName: | |
description = 'wow' | |
def instance_method(self): | |
return self.description | |
ImaginativeClassName.instance_method() # TypeError: instance_method() missing 1 required positional argument: 'self' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImaginativeClassName: | |
description = 'wow' | |
def instance_method(self): | |
return (self.description, self.greeting) | |
obj = ImaginativeClassName() | |
obj.greeting = 'mindblowing insight' | |
obj.instance_method() # ('wow', 'mindblowing insight') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImaginativeClassName: | |
description = 'wow' | |
@classmethod | |
def class_method(cls): | |
return (cls.description, self.greeting) | |
obj = ImaginativeClassName() | |
obj.greeting = 'mindblowing insight' | |
obj.instance_method() # AttributeError: type object 'ImaginativeClassName' has no attribute 'greeting' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const el = document.querySelector("#app"); | |
const spicyObject = { | |
spicyMethod() { | |
return 'feel the heat'; | |
} | |
}; | |
const fullOfPotential = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Question { | |
constructor() { | |
this.answer = "No."; | |
} | |
answerMe() { | |
return this.answer; | |
} | |
} | |
const doesJavaScriptHaveClasses = new Question(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Welcome to the danger zone</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
text-align: center; | |
} | |
.danger-zone { | |
background-color: #EE3333; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('App.vue', () => { | |
test('should mount for testing', () => { | |
expect(1).toEqual(1); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
class="vte__cool-card" | |
data-test="cool-card-div" | |
> | |
hello I am a card :) | |
</div> | |
</template> | |
<script> |
OlderNewer