Skip to content

Instantly share code, notes, and snippets.

View ManishPoduval's full-sized avatar
💭
I may be slow to respond.

Manish Poduval ManishPoduval

💭
I may be slow to respond.
View GitHub Profile
// ***************************************************************
// 1: Capitalize each element of the array - the whole word:
// ***************************************************************
const fruits = ['pineapple', 'orange', 'mango'];
const capsFruits = fruits.map(oneFruit => {
return oneFruit.toUpperCase();
});
// TODO: write the methods getAge, addFriend and getRandomFriend
const chuck = {
firstName: 'Chuck',
lastName: 'Norris',
birthDate: new Date('1940-03-10'),
friends: [
'Alvaro',
'Luis'
],
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DOM - manipulation</title>
</head>
<body>
<!-- part 1 -->
<h1>To Do List</h1>
console.log('INDEX.JS connected');
// ****************************** part 1 *********************************
function mySubmitEventListener(){
let myForm = document.querySelector('#new-task-form')
myForm.addEventListener('submit', e => {
e.preventDefault();
const taskInput = document.querySelector('#task-input');
const taskContent = taskInput.value;

Box model exercise

Here we provide you some tips to do the exercise:

  • You should work with three different divs: card (gray), title (green) and content (blue).
  • The title is separated by 10px on the top and right sides, 20px from the left side and 40px from the content. It also has a 2px border.
  • The content is separated by 10px on the left and right sides. On the top and the bottom, there is an space of 5px.
@ManishPoduval
ManishPoduval / coderecorder_app.js
Created January 25, 2022 17:03 — forked from shenningsgard/coderecorder_app.js
Simple code recorder/playback for the Ace code editor.
$(document).ready(function(){
ace.config.set('basePath', '../js/lib/ace');
var editor = ace.edit("editor");
editor.$blockScrolling = Infinity;
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/html");
editor.setOptions({
enableBasicAutocompletion: true,
<style>
/* Add "Completed" to like buttons */
.view-space--357856 .action-like.action-item {
background-color: #f06e64;
padding: 4px 8px;
border-radius: 5px;
opacity: 1;
position: absolute;
left: 415px;