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 domesticAnimals = [‘Cows’, ‘Sheep’, ‘Goat’]; | |
const notSoDomesticAnimals = [‘Salamander’, ‘Iguana’, ‘Moth’, ‘Sloth’]; |
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 newAnimalsArray = domesticAnimals.concat(notSoDomesticAnimals); |
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 newAnimalsArray = [ …domesticAnimals, …notSoDomesticAnimals]; |
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 notSoDomesticAnimals = ['Salamander', 'Iguana', 'Moth', 'Sloth']; | |
const [salamander, iguana, …rest] = notSoDomesticAnimals; |
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 addAllNumers = (…args) => { | |
let result = 0; | |
for (let i = 0; i < args.length; i += 1) { | |
result += args[i]; | |
} | |
return result; | |
} |
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 Events { | |
/** | |
* Adds an event to the database | |
* | |
* @param {object} request - The request object | |
* @param {object} response - The response object | |
* | |
* @returns {object} The event object | |
*/ | |
static addEvent(request, response) { |
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 layouts = [ | |
{ | |
id: "column", | |
name: "Column", | |
layout: { | |
container: { | |
flexDirection: "column", | |
justifyContent: "center", | |
alignItems: "center" | |
} |
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
import * as React from "react"; | |
import { View, SafeAreaView, StyleSheet, Text } from "react-native"; | |
import { RectButton } from "react-native-gesture-handler"; | |
import StyleGuide from "./StyleGuide"; | |
import CheckIcon, { CHECK_ICON_SIZE } from "./CheckIcon"; | |
const styles = StyleSheet.create({ | |
buttonContainer: { | |
borderBottomWidth: 1, | |
borderColor: "#f4f6f3" |
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
import * as React from "react"; | |
import { View, StyleSheet } from "react-native"; | |
import { Feather as Icon } from "@expo/vector-icons"; | |
export const CHECK_ICON_SIZE = 35; | |
const styles = StyleSheet.create({ | |
container: { | |
width: CHECK_ICON_SIZE, | |
height: CHECK_ICON_SIZE, | |
borderRadius: CHECK_ICON_SIZE / 2, |
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
def func1(): | |
print("I am a function") | |
func1() # I am a function | |
print(func1()) # I am a function None | |
print(func1) # <function func1 at 0x102a3a210> |
OlderNewer