Results: 1022
Prints total and free memory using OS built-in module:
const os = require('os')

let totalMemory = os.totalmem()
let freeMemory = os.freemem()

console.log(`Total memory: ${totalMemory}`)
console.log(`Free memory: ${freeMemory}`)
logger.js
file exports object which contains only the
log()
function. Content of the
logger.js
file:
function log(message) {
  console.log(message)
}

module.exports.log = log
The
log()
function is called in the
index.js
file:
const logger = require('./logger')

logger.log('some text')
logger.js
file exports
log()
function. Content of the
logger.js
file:
function log(message) {
  console.log(message)
}

module.exports = log
The
log()
function is called in the
index.js
file:
const log = require('./logger')

log('some text')
Each
.js
file is a
module
itself, which contains important information about the file. If we
console.log(module)
, it will print the following object:
Module {
  id: '.',
  path: '/home/runner/xrfnkv6ixs',
  exports: {},
  parent: null,
  filename: '/home/runner/xrfnkv6ixs/index.js',
  loaded: false,
  children: [],
  paths: [
    '/home/runner/xrfnkv6ixs/node_modules',
    '/home/runner/node_modules',
    '/home/node_modules',
    '/node_modules'
  ],
  _compile: [Function]
}
exports
key includes the content (variable / function / object) that's going to be publicly available for other modules
filename
key is equal to the module file location ...
As default
border
size is included into container's width but
outline
property is opposite of border, it's added outside of the container
contain
will show the entire image
#img1 {
  object-fit: contain;
}
cover
will take the entire space and maintain the image aspect ratio
#img2 {
  object-fit: cover;
}
The
inset
property in CSS is a shorthand for the following four properties:
top
,
right
,
bottom
and
left
.exampleText {
  position: absolute;
  inset: 10px 30px 60px 40px;
  background-color: yellow;
}
Its parent element needs to have
position
property with
relative
value
div {
  background-color: green;
  height: 200px;
  position: relative;
  color: blue;
}
Affects only the first element with the specified class
.slide
document.querySelector('.slide').remove()
Removes all the elements with the specified class
document.querySelectorAll('.slide').remove()
Fetch with promises
async function start() {
  try {
    fetch("https://dog.ceo/api/breeds/list/all").then(function(response) {
      return response.json()
    }).then(function(data) {
      createBreedList(data.message)
    })
  } catch (e) {
    console.log("There was a problem fetching the breed list.")
  }
}
Fetch with
async
&
await
keywords
async function start() {
  try {
    const response = await fetch("https://dog.ceo/api/breeds/list/all")
    const data = await response.json()
    createBreedList(data.message)
  } catch (e) {
    console.log("There was a problem fetching the breed list.")
  }
}
JS Projects
To-Do App (adding / deleting items to the list) https://codepen.io/Tandilashvili/pen/BaYdqMz?editors=1010 https://www.youtube.com/watch?v=HQuJzGU7TWg http://sibrdzne.ge/ot/projects/JS/to-do-app/index.html To-Do List App (adding / deleting / editing items to the list) https://codepen.io/Tandilashvili/pen/OJQBoRQ https://www.youtube.com/watch?v=b8sUhU_eq3g http://sibrdzne.ge/ot/projects/JS/to-do-app-with-edit/index.html Multiple Choice Quiz App https://codepen.io/Tandilashvili/pen/GRQYGGb https://www.youtube.com/watch?v=49pYIMygIcU http://sibrdzne.ge/ot/projects/JS/multiple-choice-quiz/index.html Dogs, (API 🐶 Fetch, Promises & Async Await) https://codepen.io/learnwebcode/pen/LYNWQgg https://www.youtube.com/watch?v=AVmGmLFcukM http://sibrdzne.ge/ot/projects/JS/dog-api/index.html Weather App (API) https://codepen.io/Tandilashvili/pen/WNMXPoB https://www.youtube.com/watch?v=KqZGuzrY9D4 http://sibrdzne.ge/ot/projects/JS/weather-app/index.html Image Carousel https://codepen.io/Tandilashvili/pen/RwQxMVm https://www.youtube.com/watch?v=9HcxHDS2w1s http://sibrdzne.ge/ot/projects/JS/image-carousel/index.html Clock https://codepen.io/Tandilashvili/pen/vYdVXVR https://www.youtube.com/watch?v=Ki0XXrlKlHY http://sibrdzne.ge/ot/projects/JS/clock/index.html Calculator https://codepen.io/Tandilashvili/pen/OJQBBZL https://www.youtube.com/watch?v=QS6Y0ezhyCs http://sibrdzne.ge/ot/projects/JS/calculator/index.html Movie App (API) https://codepen.io/Tandilashvili/pen/BaYqbNK https://www.youtube.com/watch?v=9Bvt6BFf6_U http://sibrdzne.ge/ot/projects/JS/movie-app/index.html Books List App (class, localStorage) https://codepen.io/Tandilashvili/pen/RwQqgVw?editors=1010 https://www.youtube.com/watch?v=JaMCxVWtW58 http://sibrdzne.ge/ot/projects/JS/books-list-app/index.html Budget App (edit, delete, localStorage) https://codepen.io/Tandilashvili/pen/ExQOvxB https://www.youtube.com/watch?v=SQbCwfGC7EM http://sibrdzne.ge/ot/projects/JS/budget-app/index.html Task Management (Draggable, with statuses) https://codepen.io/Tandilashvili/pen/wvyRMLE https://www.youtube.com/watch?v=m3StLl-H4CY http://sibrdzne.ge/ot/projects/JS/task-management/index.html Navigation Bar https://codepen.io/Tandilashvili/pen/WNMLwOq https://www.youtube.com/watch?v=hy2OwJE_OEA http://sibrdzne.ge/ot/projects/JS/navigation-bar/index.html Multi Step Form https://codepen.io/Tandilashvili/pen/dydwMqe https://www.youtube.com/watch?v=JFfVilQSius http://sibrdzne.ge/ot/projects/JS/multi-step-form/index.html Piano https://codepen.io/Tandilashvili/pen/GRQPXNj https://www.youtube.com/watch?v=vjco5yKZpU8 http://sibrdzne.ge/ot/projects/JS/piano/index.html Math Game (+ - * two numbers) https://codepen.io/learnwebcode/pen/mdPMBjL https://www.youtube.com/watch?v=EVze4Cq-dZ8 http://sibrdzne.ge/ot/projects/JS/math-game/index.html Word Beater Game https://codepen.io/Tandilashvili/pen/XWZxOOV?editors=1010 https://www.youtube.com/watch?v=Yw-SYSG-028 http://sibrdzne.ge/ot/projects/JS/word-beater-game/index.html Tic Tac Toe Game https://codepen.io/Tandilashvili/pen/jOZeQWw https://www.youtube.com/watch?v=B3pmT7Cpi24 http://sibrdzne.ge/ot/projects/JS/tic-tac-toe-game/index.html Snake Game (Canvas) https://codepen.io/Tandilashvili/pen/abqVXOm https://www.youtube.com/watch?v=9TcU2C1AACw http://sibrdzne.ge/ot/projects/JS/snake-game/index.html Pong Game https://codepen.io/Tandilashvili/pen/RwQEBqw https://www.youtube.com/watch?v=PeY6lXPrPaA http://sibrdzne.ge/ot/projects/JS/pong-game/index.html
Results: 1022